Converting between types.

  • Casting
  • Using the as operator
  • Parsing. 문자열을 원하는 타입으로.
  • Using System.Convert
  • Using System.BitConverter. byte스트림을 원하는 값으로.

Casting

value typereference type
Narrowing conversion데이타 손실이 있을 수 있는 경우is/as 사용해서 확인 후
Widening conversion데이타 손실이 없는 있는 경우상위 클래스로

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter