G
Guest
When trying to compile my application, the following line of code give me a
syntax error:
CaseAffiliation affiliation = (dataArray[13].GetType() ==
System.Type.GetType("DbNull")) ? null :
(CaseAffiliation)Enum.Parse(typeof(CaseAffiliation),
dataArray[13].ToString());
Where CaseAffiliation is defined as:
public enum CaseAffiliation
{
BrokerDealer,
NfpsiRia,
OutsideRia,
NotSecuritiesRelated
}
The error is:
Type of conditional expression can't be determined because there is no
implicit conversion between '<null>' and 'Acr.CaseAffiliation'
I tried looking this error up in the .net sdk but the description was a
little over my head. Can someone explain this to me?
syntax error:
CaseAffiliation affiliation = (dataArray[13].GetType() ==
System.Type.GetType("DbNull")) ? null :
(CaseAffiliation)Enum.Parse(typeof(CaseAffiliation),
dataArray[13].ToString());
Where CaseAffiliation is defined as:
public enum CaseAffiliation
{
BrokerDealer,
NfpsiRia,
OutsideRia,
NotSecuritiesRelated
}
The error is:
Type of conditional expression can't be determined because there is no
implicit conversion between '<null>' and 'Acr.CaseAffiliation'
I tried looking this error up in the .net sdk but the description was a
little over my head. Can someone explain this to me?