Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hi All,
 
I am a VB developer and now I have moved to VB.NET. I have few doubts which was easy to do VB 6.0 but not in VB.NET.
 
1. How to navigate in the property window?
Is there any short key to navigate in the property window.
For ex. in VB 6.0 I select a control and press F4 it opens the property window it happens the same in VB.NET as well, but in VB 6.0 we can navigate to any property by pressing Ctrl+Shift+(Initial Character of the property). For ex. If I have to go to its name property in VB 6.0 I will press Ctrl+Shift+N and it will move to the Name property of the control.
 
2. What is the need of "readonly" keyword in VB.NET to create a read only property as in VB 6.0 we can create read only property not to give the setter(Set) only getter(Get)?
 
I Googled but could not find a satisfactory result.
 
Thanks,
Sukhen Dass
Posted 12-Nov-11 4:15am
Edited 12-Nov-11 5:08am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

1. The shortcut key is still F4, but may depend on your settings (learn to use Visual Studio, it has nothing to do with VB).
2. The ReadOnly keyword[^]. I haven't given much thought to it (and neither should you, just accept it), but I like it because it shows IntelliSense that a Property is ReadOnly (having a regular Property with a Private Setter does not accomplish the same thing). But if I had to make a guess as to why it is absolutely necessary I'd guess it lets your compiler know that it does not have to create a Setter for the specified Property (IL does not create a set_Property Method). Might be better for performace. Same for WriteOnly Properties.
  Permalink  
Comments
sukhen dass at 12-Nov-11 9:38am
   
thanks for your valuable time.
1.I know its F4 to open the property window...but my question is not how to open the property window my question is how to navigate in that property window.
 
2.you might be right about the readonly property...but if microsoft has given this it should be written somewhere in msdn but i dint find there in msdn and must be some purpose
Naerling at 12-Nov-11 10:01am
   
Well, MSDN is not always correct or complete. C# can simply have properties and not define a setter. I guess no one just really asked WHY ReadOnly was necessary :)
The shortcuts in the Property Window itself I do not know. You can use the arrow keys and pageup/pagedown keys to navigate though. Hope you're not to keen on those shortcut keys...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 21 Oct 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100