Hi there,
I'm new to C# and I have to admit it feels very overwhelming. I was wondering if anyone could help me and explain it to me so that I can understand.
Here's my code...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Counter1
{
public class Counter
{
private int n = 0;
public int Increment()
{
n = n + 1;
}
public readonly int GetCount()
{
get
{
return n;
}
}
}
}
I'm not sure what I'm actually doing wrong... it doesn't recognise the get function and I have researched through many websites and they don't do much besides using the word get and I have already done that.
If anyone could help me out I'd appreciate it so much!! It's hard to get my mind around it.