Ad Code

Responsive Advertisement

Working with VisualStudio.Net

Working With VISUALSTUDIO .NET 

It’s an editor used for developing .net application in any .net language like C#, VB etc. as well as any type of application like console, windows , web etc.

Versions of VISUAL STUDIO .NET –
__________________________________
YEAR                  Version
---------------------------------------------
2002                     framework 1.0
2003                     framework 1.1
2005                     framework 2.0
2008                     framework 3.5
2010                     framework 4.0
----------------------------------------------
  • TO open VS go to start menu  programs ms visual studio  ms visual studio and click on it to open. 
  • Applications developed under visual studio are known as Projects” where a “project” is the collection of various files or items. To create a project either click on  new project option or go to file menu  select new project, which opens new project window.
  •  under new Project window we need to specify the following details
1. in the LHS chose the language in which we want to develop the application
    eg Visual C# .
2. In the middle chose the type of application we want to develop by choosing a project template.
    eg – console application.
3. In the bottom specify a name to the project.
    eg – SampleProject.
4. Below project name specify the location where to save the project.
    eg- C:\CSharp4
  •  click on OK button which creates the project with a default class program under the file Program.cs
  •  When projects are developed in VS by default a Namespace is gets created with same name of the Project i.e. SampleProject. From now each and every class of the project comes within the same name space.
          NOTE - a Namespace is a logical continuer of types.
  •  Now under Main method of Program Class write the following code.
                   Console.WriteLine(“My first Project”);
                   Console.WriteLine();
  •  To run the class either presses F5 or ctrl + F5 or Click on start debugging button on top of the studio which will saved compile and executes the program.
  •  under VS we find a window known as “ Solution Explorer” used for organizing the complete application, which allows to view, add or Delete items under the project, to open ”solution" explorer 
                           --> go to view menu and select “solution Explorer “
  •  to add new class under project open solution explorer --> Right click on Project --> select add new item --> which opens add new item window --> select class template in it specify a name in the bottom --> click on add button which add the class under project eg- class1.cs
          Note – the new class added also comes under the same Namespace.
  •  Now under the class write following code.
static void Main()
{
Console.WriteLine(“second class”);
Console.ReadLine(); 
}
  •  To run the class open Solution Explorer --> right click on the Project --> select properties -->which opens project property window --> under it we find an option --> startup objects which lists all the classes of project that contains a valid main method in them --> choose your class and run.

Objects Oriented Programming – 

It is an approach that came into existence in 70 th to resolve the drawbacks of traditional procedural approach i.e. security and reusability.Object Oriented Languages provides Security and Reusability under them we can call a language as OO provided it satisfied the principals of the approach, those are –

1. Encapsulation.
2. Abstraction.
3. Inheritance.
4. Polymorphism.

As per Encapsulation the code (members) of an OOP has to be enclosed under a wrapper or continuer known as class that provides basic security for contain that is present inside it.

Abstraction –

Is all about hiding the complexity, behind the code by providing a set of interfaces used for consuming the functionality. Methods are the best example for abstraction because we never know what is the underling code in it, what we required to know only how to invoke it.

Inheritance - 

provides code reusability which can be used for consuming members of a class from other class by stabilizing parent/child relation between classes.



Polymorphism – is an approach which tells entities behaves in different ways depending upon the inputs it receives i.e. whenever the input changes the output and the behavior of the entity also changes, which can be implemented using approaches like Overloading and overwriting.
Reactions

Post a Comment

0 Comments