Tuesday, October 20, 2009

Upcasting in OOPS

assigning the child class to the parent class that is called the Upcasting


public abstract class Class1
{
public string getValue()
{
return "sd";
}
}

public class class3 : Class1
{
public string GetValue1()
{
Class1 SS =new class3();
return SS.getValue();
}
}