32 lines
578 B
C#
32 lines
578 B
C#
/*
|
|
* Author: Nikolay Dvurechensky
|
|
* Site: https://www.dvurechensky.pro/
|
|
* Gmail: dvurechenskysoft@gmail.com
|
|
* Last Updated: 12 мая 2025 02:47:11
|
|
* Version: 1.0.3
|
|
*/
|
|
|
|
using System;
|
|
|
|
/*
|
|
* Сыойства (Properties)
|
|
*
|
|
* Автоматические свойства (prop)
|
|
*/
|
|
class Point
|
|
{
|
|
private int x;
|
|
public void SetX(int x) => this.x = x;
|
|
public int GetX() => x;
|
|
}
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
Point point = new Point();
|
|
point.SetX(5);
|
|
Console.WriteLine(point.GetX());
|
|
Console.ReadKey();
|
|
}
|
|
} |