TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashwani Chaudhary
NA
179
30.6k
Confusion of access level of variables in static method.
Jul 23 2015 3:22 AM
using System;
namespace ConsoleApplication19
{
class Program
{
int a = 10;
static int b = 10;
static void myfun()
{
int j = 10;
Console.WriteLine("Hello {0}",j); // valid
Console.WriteLine("Hello {0}", a); //invalid
Console.WriteLine("Hello {0}", b); //valid
}
static void Main(string[] args)
{
myfun();
Console.ReadKey();
}
}
}
Reply
Answers (
18
)
c# collection
Rad an Excel Chart using NPOI Library