﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » What is this error?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 04:13:14 GMT</lastBuildDate><ttl>20</ttl><item><title>What is this error?</title><link>http://forum.strataframe.net/FindPost1180.aspx</link><description>In this code tha references a bo:&lt;br&gt;
                PatientSelectedEventArgs pa = new PatientSelectedEventArgs(boPatientSearch1.MRN, boPatientSearch1.LASTNAME, boPatientSearch1.FIRSTNAME, boPatientSearch1.BIRTHDATE, boPatientSearch1.GENDER, boPatientSearch1.SSN);&lt;br&gt;
&lt;br&gt;
with this set of event args:&lt;br&gt;
    public class PatientSelectedEventArgs : EventArgs&lt;br&gt;
    {&lt;br&gt;
        public PatientSelectedEventArgs(string MRN, string LastName, string FirstName, DateTime Birthdate, string Gender, string SSN)&lt;br&gt;
        {&lt;br&gt;
            this.MRN = MRN;&lt;br&gt;
            this.LastName = LastName;&lt;br&gt;
            this.FirstName = FirstName;&lt;br&gt;
            this.SSN = SSN;&lt;br&gt;
            this.Gender = Gender;&lt;br&gt;
            this.Birthdate = Birthdate;&lt;br&gt;
            this.IDSTRING = "MRN: " + MRN + ", Name: " + LastName + ", " + FirstName + ", Gender: " + Gender + ", Birthdate: " + Birthdate.ToShortDateString();&lt;br&gt;
        }&lt;br&gt;
        public string MRN;&lt;br&gt;
        public string IDSTRING;&lt;br&gt;
        public string LastName;&lt;br&gt;
        public string FirstName;&lt;br&gt;
        public string Gender;&lt;br&gt;
        public string SSN;&lt;br&gt;
        public DateTime Birthdate;&lt;br&gt;
    }&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
what is this?&lt;br&gt;
Argument '4': cannot convert from 'System.DateTime?' to 'System.DateTime'	&lt;br&gt;</description><pubDate>Thu, 11 May 2006 08:47:52 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: What is this error?</title><link>http://forum.strataframe.net/FindPost1197.aspx</link><description>That's very odd... I've never heard of .NET not being able to cast an object to its own type.</description><pubDate>Thu, 11 May 2006 08:47:52 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: What is this error?</title><link>http://forum.strataframe.net/FindPost1191.aspx</link><description>I think that I tried that and got the same message. The only thing that worked was &lt;br&gt;
DateTime.Parse(bo.NullableGenericDate.Value.ToShortDateString()).</description><pubDate>Wed, 10 May 2006 16:38:55 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: What is this error?</title><link>http://forum.strataframe.net/FindPost1188.aspx</link><description>When you pass a nullable generic from a property, you will need to pass the propertie's .Value member.&amp;nbsp; Like this:&lt;P&gt;new PatientSelectedEventArgs(boPatientSearch1.MRN, boPatientSearch1.LASTNAME, boPatientSearch1.FIRSTNAME, boPatientSearch1.BIRTHDATE&lt;STRONG&gt;.Value&lt;/STRONG&gt;, boPatientSearch1.GENDER, boPatientSearch1.SSN);&lt;BR&gt;&lt;P&gt;Otherwise, you're passing a NullableGeneric value into an actual value.</description><pubDate>Wed, 10 May 2006 11:10:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: What is this error?</title><link>http://forum.strataframe.net/FindPost1186.aspx</link><description>yes, nullable generic</description><pubDate>Wed, 10 May 2006 10:57:16 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: What is this error?</title><link>http://forum.strataframe.net/FindPost1183.aspx</link><description>Are you returning a nullable generic value for the DateTime?&amp;nbsp; If not, what is the value of the variable you're trying to pass?</description><pubDate>Wed, 10 May 2006 08:40:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>