string.parse c# code example
Example 1: string to int c#
int x = Int32.Parse("1234");
Example 2: string to xml c#
string test = "<body><head>test header</head></body>";
XmlDocument xmltest = new XmlDocument();
xmltest.LoadXml(test);
XmlNodeList elemlist = xmltest.GetElementsByTagName("head");
string result = elemlist[0].InnerXml;
Example 3: c sharp split string
string text = "Hello World!"
string[] textSplit = text.Split(" ");
Example 4: split string in c#
string phrase = "The quick brown fox jumps over the lazy dog.";
string[] words = phrase.Split(' ');
foreach (var word in words)
{
System.Console.WriteLine($"<{word}>");
}