Я думаю, что это код ОК, повторите, предложите мне, если есть, если есть Хорошо, и что я могу добавить или сделать лучше, что уже присутствует < /p>
Код: Выделить всё
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StackOverflow
{
class Stackoverflow
{
//attributes
private string _title { get; set; }
private string _description { get; set; }
private long _upVote=0;
private long _downVote=0;
private DateTime _timeCreation;
//methods
public void setUpVote(bool voto)
{
if (voto) { _upVote++; }
else { _downVote++; }
}
//getter and setter
public void setTitle(string title) { _title = title; }
public string getTitle() { return _title; }
public void setDescrizion(string description) { _description = _description; }
public string getDescrizion() { return _description; }
public void setTImeCreation(DateTime date) { _timeCreation = date; }
public DateTime getTimeCreation() { return _timeCreation; }
}
internal class Program
{
static void Main(string[] args)
{
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... is-just-an