I used Visual Studio to create a new class for me.
It produced this..
I've then tried to instantiate an instance of User but I just get this error...
What has VS created and why can't I use it?
I'm assuming the method User is the constructor where I would initialise attributes etc.. and below that would start adding my own public/private methods.
I don't get it?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
It produced this..
Code:
namespace CDC_Test1
{
/// <summary>
/// Database User
///
/// </summary>
public sealed class User
{
private static User instance = new User();
public static User Instance {
get {
return instance;
}
}
private User()
{
}
}
}
I've then tried to instantiate an instance of User but I just get this error...
Error 1 'CDC_Test1.User.User()' is inaccessible due to its protection level C:\C#\CDC_Test1\CDC_Test1\Program.cs 24 38 CDC_Test1
What has VS created and why can't I use it?
I'm assuming the method User is the constructor where I would initialise attributes etc.. and below that would start adding my own public/private methods.
I don't get it?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music