Появилась необходимость создания условий , но не могу теперь немного разобраться , в общем то , у меня есть условие if и esle public void function02() { string path = "System/regres/1/base_full.ini"; var lines = File.ReadAllLines(path); string[] words; if (lines.Length > 0) { using StreamReader reader_bd = new StreamReader(path, Encoding.Default); string phrase = reader_bd.ReadLine() .Replace("\r\n", "\n") .Replace("\n\r", "\n"); words = phrase.Split(new char[] { ';', ':', '|' }, StringSplitOptions.RemoveEmptyEntries); wmsoft.1sss.Text = words[0]; wmsoft.2sss.Text = words[1]; wmsoft.3sss.Text = words[2]; wmsoft.4sss.Text = words[3]; wmsoft.5sss.Text = words[4]; wmsoft.6sss.Text = words[5]; wmsoft.7sss.Text = words[6]; function04(); hiddenelemform2(); } else { wmsoft.TextBox_Dialog_Error.Text = "Ошибка"; wmsoft.Grid_Show_Dialog_Logs.Visibility = Visibility.Visible; } return; Код public void function02() { string path = "System/regres/1/base_full.ini"; var lines = File.ReadAllLines(path); string[] words; if (lines.Length > 0) { using StreamReader reader_bd = new StreamReader(path, Encoding.Default); string phrase = reader_bd.ReadLine() .Replace("\r\n", "\n") .Replace("\n\r", "\n"); words = phrase.Split(new char[] { ';', ':', '|' }, StringSplitOptions.RemoveEmptyEntries); wmsoft.1sss.Text = words[0]; wmsoft.2sss.Text = words[1]; wmsoft.3sss.Text = words[2]; wmsoft.4sss.Text = words[3]; wmsoft.5sss.Text = words[4]; wmsoft.6sss.Text = words[5]; wmsoft.7sss.Text = words[6]; function04(); hiddenelemform2(); } else { wmsoft.TextBox_Dialog_Error.Text = "Ошибка"; wmsoft.Grid_Show_Dialog_Logs.Visibility = Visibility.Visible; } return; Нужно как то вписать в код , что если if значение = true (т.е выполнено) , идет следующее условие для выполнения . Т.е после выполнения первого условие , в след выполняется другое условие.
if (123 == true) { if (456 == true) { if(789 == true) { } } } C# if (123 == true) { if (456 == true) { if(789 == true) { } } } ???
SNAIQ, ну ебать, а что непонятного?? иф 123 == тру + иф 456 == тоже тру, то пишешь чо там тебе надо. если не тру - пишешь в else чо там дальше делать тебе надо
SNAIQ, if (uslovie == true) { if (uslovie2 == true) { std::cout << "условие и условие2 верны"; } } C if (uslovie == true) { if (uslovie2 == true) { std::cout << "условие и условие2 верны"; } }