Hi Siddu, Following code shows example ........
/// <summary>
/// This class contains members and methods both
/// </summary>
public class Members_And_Methods
{
int Area { get; set; }
public void Test(int height, int width)
{
Members_Only obj = new Members_Only()
{
Height = height,
Width = width
};
Area = Methods_Only.GetArea(obj);
}
}
/// <summary>
/// This class contains members only
/// </summary>
public class Members_Only
{
public int Height { get; set; }
public int Width { get; set; }
}
/// <summary>
/// This class cotains methods only.
/// </summary>
public class Methods_Only
{
public static int GetArea(Members_Only obj)
{
return obj.Height * obj.Width;
}
}
Thanks and Regards,
Rk_Hirpara.