Thursday, October 3, 2013

Visual Basic property setter with more than one parameter?

Agree with Cor, and here's my additional words:


The true thing for a property must be a Get_……and Set_ function, if you write a property like this:



Public Class MultipleParameterProperty
Public Property MultipleProperty As String
End Class

And in the reflector, it will be this:




Public Function Get_MultipleProperty As String
Return this.__AnoynmousMultiplepropertyVariable
End Function



Public Sub Set_MultipleProperty
this.__AnoynmousMultiplepropertyVariable = value
End Sub

You can see its very clear——In the reflected "Set" code part:Since this is a function, and "

Set ( ByVal value As returntype" is just type of "string" in my sample, so no optional parameterlist chosne for you at its behind.



Click For donating:Free Rice For the poor

For spamming-sender issues, you can either report it at Microsoft Spamming Issue , or just find "Report Spam Here+Number" at Forum Issue ;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.

For more things to talk about? StackOverFlow is your choice.


No comments:

Post a Comment