using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public void Funkcja(ref int x)
{
x++;
}
static void Main(string[] args)
{
int b;
b=9;
Funkcja(ref b);
Console.WriteLine(b);
Console.ReadKey();
}
}
}
Podczas wywołania Funkcja(ref b); pokazuje się błąd:
An object reference is required for the non-static field, method, or property 'ConsoleApplication1.Program.Funkcja(ref int)'
O co chodzi??