Saturday, January 09, 2016

What are the different types of access specifier in VB.Net ?

Solution:-

Access specifiers describe the accessibility scope of a variable, method or a class. By using access specifiers we can control the scope of the member object of a class. Access specifiers were used for providing security of our applications. In Visual Basic .Net there are five access specifiers and they are as follows:

Public:-
             It have no restriction on accessibility. We can use the public members from any were inside the class or outside the class.

Private:-
              Their accessibility scope is limited to only inside the class in which they are declared. We can't access the Private members from outside the class and it is the least permissive access level.

Protected:-
              The protected members have scope of accessibility within the class and classes derived(Inherited) from that class.

Friend:-
           Friend members have the accessibility scope from the same assembly and program that contain their declarations.

Protected Friend:-
            It behave like both protected and friend access specifiers. We can access the protected friend member from anywhere in same assembly and the classes inherited from the same class.

List out the major 5 toolbox object with function in VB.Net?

Solution:-
 
Label:-
           Labels are those controls that are used to display text in other parts of the application. They are based on the Control class. Notable property of the label control is the text property which is used to set the text for the label.  
Button:-
              One of the most popular control in Visual Basic is the Button Control (previously Command Control). They are the controls which we click and release to perform some action. Buttons are used mostly for handling events in code, say, for sending data entered in the form to the database and so on. The default event of the Button is the Click event and the Button class is based on the ButtonBase class which is based on the Control class.  
ListBox:-
               The ListBox control displays a list of items from which we can make a selection. We can select one or more than one of the items from the list. The ListBox control is based on the ListControl class which is based on the Control class. The image below displays a ListBox.Notable Properties of the ListBox
ComboBox:-
                ComboBox is a combination of a TextBox and a ListBox. The ComboBox displays an editing field (TextBox) combined with a ListBox allowing us to select from the list or to enter new text. ComboBox displays data in a drop-down style format. The ComboBox class is derived from the ListBox class. Below is the Image of a ComboBox.
Checkbox:-
                CheckBoxes are those controls which gives us an option to select, say, Yes/No or True/False. A checkbox is clicked to select and clicked again to deselect some option. When a checkbox is selected a check (a tick mark) appears indicating a selection. The CheckBox control is based on the TextBoxBase class which is based on the Control class. Below is the image of a Checkbox.