- 156 名前:デフォルトの名無しさん mailto:sage [2007/11/02(金) 15:17:53 ]
- VB2005で。
Dim strA As String = "ABC" Dim strB As String strB = strA strA = "XXX" Debug.Print("strA=" & strA) Debug.Print("strB=" & strB) 実行結果 strA=XXX strB=ABC なんでstrBも"XXX"と出力されないの? String型変数は参照型なんだから、strAもstrBも同じ領域を参照してるんじゃないの? それともstrA="XXX"の行は参照先の書き換えではないんだろうか…
|

|