Example:
public class Name {
public string FirstName { get; private set; }
public string LastName { get; private set; }
private Name() { }
public Name(string firstName, string lastName) {
FirstName = firstName;
LastName = lastName;
}
}
When trying to instantiate this c# class, intellisense shows both the private and the public constructor for new keyword even though one of the constructor is private!
What is even more weird is that when I remove the second argument from the public constructor ( remove lastName as argument to public constructor), intellisense now shows just the public constructor with new keyword, correctly.
Is this a bug or am I missing something here? I am using VS2008 SP1.
edit: code clarity