|
-
Mar 12th, 2007, 08:40 PM
#1
Thread Starter
Member
Can/how done
is it possible to create like a structure or class so that i can just put like
player1.color = green
something like that.
It would make everything a whole lot easier.
I remember being able to do something along those lines in c++ but really not sure how in vb.net
thanks
-blackout
-
Mar 12th, 2007, 08:48 PM
#2
Re: Can/how done
They are pretty much the same:
vb Code:
Structure Player
Public color As Integer
End Structure
Dim player1 As Player
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Mar 13th, 2007, 01:59 AM
#3
Frenzied Member
Re: Can/how done
Shouldn't that be Type?
You can also make a class:
Put in it:
[vbcode]Private vColor As Long
Public Property Get Color() As Long
Color = vColor
End Property
Public Property Let Color(nColor As Long)
vColor = nColor
End Property[/vbcode]
-
Mar 15th, 2007, 01:34 AM
#4
Re: Can/how done
 Originally Posted by jeroen79
Shouldn't that be Type?
You can also make a class:
Put in it:
vb Code:
Private vColor As Long
Public Property Get Color() As Long
Color = vColor
End Property
Public Property Let Color(nColor As Long)
vColor = nColor
End Property
Not in .NET.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|