Converting Strings

HTML Encode / Decode strings string MyString = "<hello>"; MyString = WebUtility.HtmlEncode(MyString); string MyString = "&lt;hello&gt;"; MyString = WebUtility.HtmlDecode(MyString);  

Read More

Working With Strings

Read individual characters from a string Treat the string as an array string MyString = "abcd"; char MyChar = MyString[2]; Get Characters Between Markers Within String string sTemp = responseStr; string StartAfterChars; string EndBeforeChars; int Start; int Length; string FoundString; StartAfterChars = "<requestID>"; EndBeforeChars = "</requestID>"; Start = sTemp.IndexOf(StartAfterChars) + StartAfterChars.Length; Length = sTemp.IndexOf(EndBeforeChars) – […]

Read More

.Strings General

Multi Line Strings Use the '@' character before the string to create a verbatim string literal: String sTemp = @"This string is on multiple lines"; Notes: You can have the string be on multiple lines You don't need to escape characters other than " (which you do by using "" 2 x double quotes), so […]

Read More