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 does ienumerable mean?
What's the implicit name of the parameter that gets passed into the set method/property of a class?
Explain how to add controls dynamically to the form using c#.net.
How to transpose multi-dimensional array?
Why do we use dataset in c#?
Why do we need properties in c#?
What is oledbconnection c#?
What is signature c#?
What is visual c# net?
How do I trim a space in c#?
Why we use get and set method in c#?
What is difference between singleton and static class in c#?
Name some string escape sequences in c#.
What is the difference between package and interface?
What is difference between new and override in c#?