- ふらっと C#,C♯,C#(初心者用) Part118 [転載禁止]©2ch.net
639 :デフォルトの名無しさん[sage]:2016/01/11(月) 00:36:17.86 ID:UeX+hyF3 - >>637
お前ほんとに>>618読んだ? それとも転載してあげた方がいい? And finally, of course the use cases of the two operators are superficially similar, but semantically quite different. A cast communicates to the reader “I am certain that this conversion is legal and I am willing to take a runtime exception if I’m wrong”. The “as” operator communicates “I don’t know if this conversion is legal or not; we’re going to give it a try and see how it goes”.
|