int型とstring型の型変換の例です。
サンプル
例)int型 → string型
1 2 |
int x = 12345; string str = x.ToString(); |
例)string型 → int型
1 2 |
string str = "12345"; int x = int.Parse(str); |
C#、VB.NET、ASP.NET、VisualStudioのリファレンスです
投稿日:2015年11月8日 更新日:
int型とstring型の型変換の例です。
1 2 |
int x = 12345; string str = x.ToString(); |
1 2 |
string str = "12345"; int x = int.Parse(str); |
執筆者:ごん
スポンサーリンク
検索
カテゴリー