기록
728x90

C# 에서 string 타입으로 숫자가 저장되어 있을때 int 타입으로 변경하는 몇가지 방법이 있다.

 

string n = "1234";

 

라고 할때,

 

 

Method.1

 

int outValue = Convert.ToInt32(n);

 

 

Method.2

 

int outValue = int.Parse(n);

 

 

Method.3

 

int outValue;

int.TryParse(n, out outValue);

 

 

ㅊㅊ:http://bemeal2.tistory.com/66

profile

기록

@데굴데구르르 림

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

2025, 이제 사내 컨플루언스에 모두 작성하게 되어서 업데이트가 잘 없을 것 같습니다..