brotherbill999
asked on
Why can't use private specifier in C#
It compiles, but if you uncomment "private", it fails to compile. WHY?
Using VS 2005.
Using VS 2005.
using System;
namespace myNameSpace
{
public class MyClass1
{
public int age;
};
public class MyClass2
{
public void foo()
{
/* private*/ MyClass1 myClass1;
}
};
};
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
another way to say what i did, yes -- did you find that on msdn or something?
ASKER
Thanx for instant response.
um no, i already told you that. just in different words.
crap, sorry -- thanks
ASKER
No, just figured it out and avoided being embarrassed by such a simple question.
ASKER
Sorry for not awarding you points. We crossed in the mail, and you did deserve the points. Maybe admin could award you the points on request...
ASKER
They are local to the procedure or function and are visible only within that procedure or function.