Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the VB.NET equivalent of the C# readonly keyword?

Tags:

vb.net

In C# you can do this to make your member variable immutable:

public readonly int y = 5;

What is the equivalent "readonly" keyword in VB.NET?

like image 760
Scott Whitlock Avatar asked Mar 03 '09 16:03

Scott Whitlock


People also ask

Is VB.NET the same as C#?

Though C# and VB.NET are syntactically very different, that is where the differences mostly end. Microsoft developed both of these languages to be part of the same . NET Framework development platform. They are both developed, managed, and supported by the same language development team at Microsoft.

Is VB.NET C based?

VB (Visual Basic.NET) is quite a simple language to understand for it resembles the basic English language. Unlike other languages including C#, it mostly uses words like AND. C#, on the flip side, is a part of the C family and owns the features of Python, Java, and C++.

What is VB in C?

Visual Basic (also known as VB) is an event driven programming language. This is the third generation of such language and is also an integrated development environment (or IDE). It comes from Microsoft and is used specifically for its programming model –COM.

Is VB.NET similar to C++?

The main difference between Visual Basic and Visual C++ is that Visual Basic is an Object Oriented Programming Language while Visual C++ is an Integrated Development Environment (IDE). Visual Basic is a user-friendly programming language developed by Microsoft.


1 Answers

Amazingly enough, it's ReadOnly

like image 145
Randolpho Avatar answered Oct 01 '22 22:10

Randolpho