Thursday, 8 August 2013

how to use class object being created in stack

how to use class object being created in stack

I am new to c# . So cant figure out the below mentioned concept .
using System;
namespace vivek
{
class viku
{
public void func1()
{
Console.WriteLine("Base");
}
}
class Behera
{
static void Main(String[] args)
{
viku v;
v.func1();
}
}
}
After compiling its showing the below error
error CS0165: Use of unassigned local variable 'v'

No comments:

Post a Comment