Scott Whitlock
Scott Whitlock

Reputation: 13839

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

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?

Upvotes: 6

Views: 1098

Answers (1)

Randolpho
Randolpho

Reputation: 56448

Amazingly enough, it's ReadOnly

Upvotes: 17

Related Questions