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?
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.
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++.
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.
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.
Amazingly enough, it's ReadOnly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With