What is this error?


Author
Message
Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
Posts: 235, Visits: 309
In this code tha references a bo:

PatientSelectedEventArgs pa = new PatientSelectedEventArgs(boPatientSearch1.MRN, boPatientSearch1.LASTNAME, boPatientSearch1.FIRSTNAME, boPatientSearch1.BIRTHDATE, boPatientSearch1.GENDER, boPatientSearch1.SSN);



with this set of event args:

public class PatientSelectedEventArgs : EventArgs

{

public PatientSelectedEventArgs(string MRN, string LastName, string FirstName, DateTime Birthdate, string Gender, string SSN)

{

this.MRN = MRN;

this.LastName = LastName;

this.FirstName = FirstName;

this.SSN = SSN;

this.Gender = Gender;

this.Birthdate = Birthdate;

this.IDSTRING = "MRN: " + MRN + ", Name: " + LastName + ", " + FirstName + ", Gender: " + Gender + ", Birthdate: " + Birthdate.ToShortDateString();

}

public string MRN;

public string IDSTRING;

public string LastName;

public string FirstName;

public string Gender;

public string SSN;

public DateTime Birthdate;

}





what is this?

Argument '4': cannot convert from 'System.DateTime?' to 'System.DateTime'   

Replies
Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
Posts: 235, Visits: 309
I think that I tried that and got the same message. The only thing that worked was

DateTime.Parse(bo.NullableGenericDate.Value.ToShortDateString()).
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
That's very odd... I've never heard of .NET not being able to cast an object to its own type.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Daniel Essin - 19 Years Ago
StrataFrame Team - 19 Years Ago
             yes, nullable generic
Daniel Essin - 19 Years Ago
StrataFrame Team - 19 Years Ago
Daniel Essin - 19 Years Ago
                         That's very odd... I've never heard of .NET not being able to cast an...
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search