Convert.ToUInt32 메서드를 사용하여 지정된 값을 32비트 부호 없는 정수로 변환합니다.
다음은 우리의 문자열입니다.
string str = "210";
이제 32비트 부호 없는 정수로 변환해 보겠습니다.
uint res; res = Convert.ToUInt32(str);
예시
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);
}
} 출력
Converted string '210' to 210