Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb.net equivalent to "private void (string text)" [closed]

Tags:

c#

asp.net

vb.net

This might seem real simple but I am I'm building a website with help online but the code is in c#. I'm wondering what the equivalent vb code is? I'm looking for something along the lines of: "Private sub checkNo(string text)" but its giving me errors. Many thanks in advance.

Private void checkNo(string text)

{

}
like image 240
SRock2016 Avatar asked Feb 24 '16 20:02

SRock2016


People also ask

What is void in Visual Basic?

The Void structure is a specialized type used internally by the . NET Framework and particularly by Visual C# and Visual C++. It represents a return value type for a method that does not return a value. Visual Basic uses a Sub procedure when a value is not returned and a Function procedure when a value is returned.

What is function explain with example in VB net?

In VB.NET, the function is a separate group of codes that are used to perform a specific task when the defined function is called in a program. After the execution of a function, control transfer to the main() method for further execution. It returns a value.

What is private void C#?

private means the method, function, or property is not accessible to outside the class but can be invoke inside the class itself. public means the method, function, or property is accessible to outside the class and can also be invoke inside the class itself.


1 Answers

VB.NET uses Sub for void returning functions:

Private Sub checkNo(text as String)
End Sub

For future reference, if you've inherited a VB.NET code base, an online converter will generally handle the basics of C# to VB.NET conversion pretty well.

like image 101
Mark Brackett Avatar answered Sep 27 '22 22:09

Mark Brackett