آشنایی با سازنده ها و مخربها در console application
فکر کنم تیتر بیان کننده موضوع باشه
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Sazande_va_Mokhareb
{
class Circle
{
class Point
{
private int x;
private int y;
public Point (int a,int b)//سازنده کلاس مورد نظر ساخته شد
{
X=a;
Y=b;
Console.WriteLine("Point Constroctor:{0}",this);
}
~Point()
{
Console.WriteLine("Point distroctor:{0}",this);
}
public int X
{
set
{
x=value;
}
get
{
return x;
}
}
public int Y
{
set
{
y=value;
}
get
{
return y;
}
}
علاقه مندی ها (Bookmarks)