1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

文系会社員がC#を一から学習する備忘録

Last updated at Posted at 2024-11-18

-----2024/11/16-----

Try.Parse()メソッドの使い方

int.TryParse(textBox.Text, out value);

どのデータ型に変換したいのかを記述(int)
第1引数には変換したい引数(textbox.Text)
第2引数には変換した値を格納する変数を記載(value)←変換可能なら自動的に格納される
(outを記載することで、メソッドから返される値がvalueに格納されるようになる)

1
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?