Created
March 8, 2012 05:41
-
-
Save indare/1998949 to your computer and use it in GitHub Desktop.
VB2008でプロパティと遊ぶ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class HogeHoge | |
Public Property Hoge() as integer | |
Get | |
Return Hoge | |
End Get | |
Set(ByVal value as integer) | |
Hoge = value | |
End Set | |
End Property | |
End Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TestFixture()> _ | |
Public Class HogeHogeTest | |
<Test()> _ | |
Public Sub 見せてもらおう自動実装とやらを() | |
Dim fuga as New HogeHoge() | |
fuga.Hoge = 100 | |
Assert.AreEqual(fuga.Hoge,100) | |
End Sub | |
End Class | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment