Convert a specified value to a 32-bit unsigned integer using the Convert.ToUInt32 method.
The following is our string.
string str = "210";
Now, let us convert it to a 32-bit unsigned integer.
uint res; res = Convert.ToUInt32(str);
Example
using System;
public class Demo {
public static void Main() {
string str = "210";
uint res;
res = Convert.ToUInt32(str);
Console.WriteLine("Converted string '{0}' to {1}", str, res);
}
}Output
Converted string '210' to 210