|
-
Mar 10th, 2009, 03:12 PM
#1
Thread Starter
Hyperactive Member
Custom property
this is the code for my property
Code:
Dim _playernumber As Integer
Property Player() As Integer
Get
_playernumber = _playernumber
End Get
Set(ByVal value As Integer)
_playernumber = value
End Set
End Property
The problem is that when i goto edit the player property at design time it always resets to 0. i know the problem has to do with the _playernumber = _playernumber part but i dont know what to change it to to fix it? any ides or suggestions?
-
Mar 10th, 2009, 03:16 PM
#2
Re: Custom property
It should be:
Code:
Get
Return _playernumber
End Get
-
Mar 10th, 2009, 03:18 PM
#3
Thread Starter
Hyperactive Member
-
Mar 10th, 2009, 03:39 PM
#4
Re: Custom property
For common things like inserting property definitions etc., visual studio provides predefined set of code snippets.
You can right click anywhere in the code editor, click "Insert Snippet" and select the snippet you want to enter.

Pradeep
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
|