[Solved] How are going to read a text file and auto save in c # [closed]

read all text string fileText = File.ReadAllText(“filePath”); if (fileText.Contains(“apple”)) { Messagebox.Show(“This word is exist”); } else { Messagebox.Show(“The word does not exist!”); File.AppendAllText(@”filePAth”, “The word does not exixt in the text file” + Environment.NewLine); } 1 solved How are going to read a text file and auto save in c # [closed]

[Solved] Show String Data in Message Box C#

Try this: MessageBox.Show(String.Format(“{0}, {1}, {2}:”, city, zip, state)); This go replace {0} with the variable city, {1}with the variable zip and {3} with state. String.Format converts the value of objects to strings based on the formats specified and inserts them into another string. If you are new, read getting started with the String.Format method New … Read more

[Solved] Message Box issues in C#

There are a bunch of overloads on MessageBox.Show. The one you want is the one where you call it with 2 strings like this: MessageBox.Show (“Mandelbrot by Milan.” + Environment.NewLine + “Email: [email protected]” + Environment.NewLine + “Contact No: +977123456789” + Environment.NewLine, “About Developer”); 1 solved Message Box issues in C#

[Solved] Shows red mark on MessageBox.Show [closed]

As you’ve deduced, MessageBox does indeed belong to System.Windows.Forms. Unless you have created a Windows Forms project, the reference to this library will not automatically be added to your project. You can add it to other project types by doing this: Right-click “References” under your project in the Solution Explorer Click “Add reference” Select “Assemblies” … Read more