class Program
{
void add()
{
int x=10, y=20;
fun();
Console.WriteLine("{0}", sum);
}
void fun()
{
int sum;
sum = x + y;
}
static void Main(string[] args)
{
Program f =new Program();
f.add();
}
}
Debug above program.....
Answer Posted / nvk
The Variable Sum Is Not defined
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What is boxing? Explain its functionality?
Where test director stores its data ? Database ,Local file etc...? I need to read this data from Visual Studio 2005 c# client. Regards
What does break do in loop?
List the difference between the virtual method and the abstract method?
What is _layout cshtml?
What is the main purpose of delegates in c#?
Is static class thread safe in c#?
What is the difference between static and constant variables?
Is string value type c#?
How to achieve polymorphism in c#?
Can you put two constructor with the same structure in a class?
What is literal control
What is the advantage of generics in c#?
What are abstract classes in c#?
What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?