Object Oriented Programming Using C# .NET

Answered

What is  Object Oriented Programming Using C# .NET ? I want to learn Object Oriented Programming in C#, any one help me out please?

Faiza_s Asked on August 16, 2017 in Programming.
Add Comment
1 Answer(s)
Best answer

Object-oriented programming (OOP) is the core feature of the .NET framework. OOP is so important, you must understand its basic principles and terms to write a simple program. The central idea behind OOP is to associate into a single unit both data and the methods that operate on that data; such units are called an object. All OOP languages provide instruments that help you implement the object-oriented model.

These are the important topics in Object Oriented Programming.

  • Classes and Objects
  • Casting
  • Constructor and Destructor
  • Function Overloading
  • Encapsulation
  • Inheritance
  • Interface
  • Polymorphism

 

 

Now we trying to print “hello world” in c#

This is very simple and basic program in c# and we use class in this program.

 

using system
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}

So Program is the name of the class that contains the Main () method. On line 1 , a using directive indicates to the compiler that this source file refers to classes and constructs declared within the System namespace. Line with the public keyword indicates the program accessibility scope for other applications or components.

The Output of this this code is shown below:

Black_Worant Answered on August 16, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.