Use this space to put some text. Update this text in HTML

468x60 banner ad

Advertise with Us

Powered by Blogger.

Thursday, 11 February 2016

What is Object Oriented Programming Concept in asp.net?


There are four features of Object Oriented Programming:-

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

Abstraction 
To reduce and remove the complexity of programming language we use abstraction.
Each real world entity has behavior and functionality. Behavior should be hidden and functionality should be exposing. 

Example-


1.      Do you know the inner details of the Monitor of your PC? What happen when you switch ON Monitor? Does this matter to you what is happening inside the Monitor? No Right, Important thing for you is weather Monitor is ON or NOT. 


2.      When you change the gear of your vehicle are you really concern about the inner details of your vehicle engine? No but what matter to you is that Gear must get changed that’s it.



Encapsulation


1. We can combine both behavior and functionality both together with the wrapper of class. This means that a class which has data member as well as method is called encapsulation. 
      2. Dividing each of its classes into two distinct parts: the interface and the implementation.
      3. Class is the best example of encapsulation.

 By using the get and set methods (Accessors and Mutators) 



    public class Account

    {


        private string accoutName;
        // get methods

        public string GetAccount()
        {
            return accoutName;
        }

        // Set method

        public void SetAccount(string name)
        {
            accoutName = name;
        }
    }

    static void Main()
    {
        string name = "SAVING_ACCOUNT";
        Account account = new Account();

        account.SetAccount(name);

        name = string.Empty;

        name = account.GetAccount();
    }

 
 

Wednesday, 10 February 2016

What is Mutable and Non-mutable string in asp.net?



Mutable String

In mutable string data is change in same address location.

Non-mutable String

In Non-mutable string data is change in new address location.


What is namespace in asp.net?


Namespace is an entity of .Net framework which is used to group similar type of utilities.

Like -> System.Drowing;

There are two types of namespace-

1.      Qualified namespace-

When we use full namespace of the system.

Like- System.drowing.point;

2.      Unqualified namespace-

When we do not use full namespace of the system Instead of  we create directive for namespace and utility are directly use.

Like- using System.drowing;
Points;