string Get = Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\KeyName\KeyName2\KeyName3", "ObjectBts", "").ToString(); MessageBox.Show(Get); Get.ToCharArray(); int i = 0; while (Get[i] != '\0') { if (Get[i] == ',') { i++; X += Get[i]; //I would like to get the other value that is after the first comma to be stored in Y (which has to be 32 // Also I would like the third value to be stored in the Z integer (which has to be 156) } else { i++; } }
var data=Get.Split(','); int X=Convert.ToInt32(data[0]); int Y=Convert.ToInt32(data[1]); int Z=Convert.ToInt32(data[2]);
var Getstring = str.Split(new [] { ',' }, 2)[0]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)