Why public sub new()
-
Hai, I have seen the use of Public sub new() in VB.net. What is the use of that?I will apreciate if somebody can give me a brief idea about that. Similarly what we can use in C# instead od Public sub new(). Please show me the right way. Thank You, Rahul
-
Hai, I have seen the use of Public sub new() in VB.net. What is the use of that?I will apreciate if somebody can give me a brief idea about that. Similarly what we can use in C# instead od Public sub new(). Please show me the right way. Thank You, Rahul
Public Sub New() is whats called the constructor for a class in VB. In there, you can set variables to default values, or other stuff thats required for the class to work properly. C# is a little different...
-
Hai, I have seen the use of Public sub new() in VB.net. What is the use of that?I will apreciate if somebody can give me a brief idea about that. Similarly what we can use in C# instead od Public sub new(). Please show me the right way. Thank You, Rahul
-
C# uses the class name for constructor with no return type.
public class MyClass { // ctor public MyClass() {} }
Hai Danie,j4amieC, Thanks much for the help. Thank You, Rahul. SoftwareDeveloper(.NET)