How can I use SUBSTRING and INSTRING in C# ?
String.Substring String.IndexOf
Use the Substring and IndexOf methods of the String class. Code: string str = "Hello World"; MessageBox.Show(str.Substring(3, 4)); // Displays "lo W" MessageBox.Show(str.IndexOf('W').ToString()); // Displays 6 Note that .NET 2.0 strings have a Contains method as well.
string str = "Hello World"; MessageBox.Show(str.Substring(3, 4)); // Displays "lo W" MessageBox.Show(str.IndexOf('W').ToString()); // Displays 6
Why is my data not saved to my database? | MSDN Data Walkthroughs VBForums Database Development FAQ My CodeBank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) Beginner Tutorials: VB | C# | SQL
Thanks for your answer. Sohel
Forum Rules