R
RayLopez99
I saw this code recently:
public class MyClass
{
public string MyString;
public DateTime? DateOfBirth {get; set;}
public MyClass (string S, DateTime? dateOfBirth)
{
MyString = S;
DateOfBirth = dateOfBirth;
}
}
What does the "?" parameter stand for? Does this mean assignment of a
DateTime is optional? I thought you can't do that in C#
RL
public class MyClass
{
public string MyString;
public DateTime? DateOfBirth {get; set;}
public MyClass (string S, DateTime? dateOfBirth)
{
MyString = S;
DateOfBirth = dateOfBirth;
}
}
What does the "?" parameter stand for? Does this mean assignment of a
DateTime is optional? I thought you can't do that in C#
RL