UrbanPro

Learn .Net Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is VB.NET equivalent create instance (.net, vb.net, class, properties, instance, development)?

Asked by Last Modified  

1 Answer

Learn .Net

Follow 1
Answer

Please enter your answer

In VB.NET, the equivalent code for creating an instance of a class is similar to C#. Here's an example of how you can create an instance of a class in VB.NET: ```vb.net' Define a simple classPublic Class MyClass Public Property MyProperty As String Public Sub New() ' Constructor End SubEnd Class Module...
read more

In VB.NET, the equivalent code for creating an instance of a class is similar to C#. Here's an example of how you can create an instance of a class in VB.NET:

```vb.net
' Define a simple class
Public Class MyClass
Public Property MyProperty As String

Public Sub New()
' Constructor
End Sub
End Class

Module Module1
Sub Main()
' Create an instance of the class
Dim myInstance As New MyClass()

' Access and modify properties
myInstance.MyProperty = "Hello, VB.NET!"

' Use the instance as needed
Console.WriteLine(myInstance.MyProperty)
End Sub
End Module
```

In this example:

- We define a simple class named `MyClass` with a property (`MyProperty`) and a constructor (`New`).
- In the `Main` method, we create an instance of the `MyClass` using the `New` keyword.
- We access and modify the properties of the instance as needed.

The syntax for creating an instance in VB.NET involves using the `New` keyword, followed by the class name and parentheses. The parentheses are optional if the class has a parameterless constructor.

Remember that the general principles of object-oriented programming and class instantiation are similar between C# and VB.NET, but the syntax may vary. VB.NET tends to be more verbose and may use keywords like `Dim` for variable declaration and `New` for object instantiation.

read less
Comments

Related Questions

Are Frontend developers that know C# and ASP.Net in demand?
C# and ASP.Net are not much in demand now a days. Few projects which are in maintenance, you may get vacancies. Upgrade your skills to Angular would be a better idea.
Taj
0 0
8
I want to expertise in dot net. But I don't have any programming knowledge.
Hi Banhi, It is a journey and not a one shot thing. First Step is Learning, Second is Training/Working on Demo or a LIVE Project. Like in any other journey you will feel that it is a very long thing but...
Banhi
Hi, how to learn dot net for job?
You should start with SQL Server 2012 then learn C# 5.0, then learn ASP.NET 4.5 and ASP.NEt MVC 5.0, jQuery and Angular JS if you like ASP.NET. If you don't like ASP.NET, then learn WPF.
Yoga
Hi All,.NET MVC with entity framework, Wcf and SQL classes are going in mumbai location. Fees is 5k for each subject.
All the best... I take it up in Bangalore. Fees is very flexible as i am going to start here as a fresh. Feel free to contact me..
Abhishek Pathak
1 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Steps to fill drop-down value from database to view page in ASP.Net MVC Application
In simple few steps you can fill the dynamic data from database to HTML page in MVC Application Write connection string in web config file Create table related getter setter in model Fetch data...

ASP .Net Interview Questions.
1. What is ASP? Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting...

ValidateAntiForgeryToken used in ajax request in MVC
Today we learn how to use antiforgery token validation Key in ajax reqeust (MVC) first we create a Action with attributes antiforgery key.. Now we add @Html.AntiForgeryToken() in view and then create...

Export To Excel using StringBuilder in ASP.net MVC C#
public ActionResult Export() { StringBuilder sb = new StringBuilder(); //static file name, can be changes as per requirement string sFileName = "filename.xls"; //Bind...
M

Mohammad Shafi

1 0
1

Software Development Training In Jaipur
Satyam Web Solution provides website designing &development and software designing &development training in Jaipur for various stream’s students. MCA 6 month Industrial Training/Internship B....

Recommended Articles

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Looking for .Net Training ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for .Net Training Classes?

The best tutors for .Net Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn .Net Training with the Best Tutors

The best Tutors for .Net Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more