Click here to Skip to main content
15,885,032 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
Pete O'Hanlon3-Jul-22 23:54
mvePete O'Hanlon3-Jul-22 23:54 
GeneralRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
j11codep4-Jul-22 0:18
j11codep4-Jul-22 0:18 
QuestionLinq to SQL With Enum On Null Field [MODIFIED] Pin
Kevin Marois1-Jul-22 17:49
professionalKevin Marois1-Jul-22 17:49 
AnswerRe: Linq to SQL With Enum On Null Field Pin
OriginalGriff1-Jul-22 18:43
mveOriginalGriff1-Jul-22 18:43 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 9:40
professionalKevin Marois2-Jul-22 9:40 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Dave Kreskowiak2-Jul-22 9:49
mveDave Kreskowiak2-Jul-22 9:49 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 9:59
professionalKevin Marois2-Jul-22 9:59 
GeneralRe: Linq to SQL With Enum On Null Field Pin
OriginalGriff2-Jul-22 9:52
mveOriginalGriff2-Jul-22 9:52 
And there is your problem: enum is not a nullable type (it's syntactical sugar for a boring old int) so it can't be tested using the ?? operator - hence the error message.

I'd strongly suggest that your data source is the problem, and that that shouldn't be capable of returning null value in that field - but if you cast it to a nullable int, you should be able to use that with the ?? operator to return an enum.
I haven't tested it - I'm on a tablet and coding becomes a true PITA without a proper KB and mouse! Laugh | :laugh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 9:59
professionalKevin Marois2-Jul-22 9:59 
QuestionRe: Linq to SQL With Enum On Null Field Pin
Eddy Vluggen2-Jul-22 10:37
professionalEddy Vluggen2-Jul-22 10:37 
AnswerRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 14:58
professionalKevin Marois2-Jul-22 14:58 
AnswerRe: Linq to SQL With Enum On Null Field Pin
Dave Kreskowiak2-Jul-22 4:59
mveDave Kreskowiak2-Jul-22 4:59 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 9:43
professionalKevin Marois2-Jul-22 9:43 
AnswerRe: Linq to SQL With Enum On Null Field [MODIFIED] Pin
Richard Deeming4-Jul-22 21:40
mveRichard Deeming4-Jul-22 21:40 
QuestionStreaming data from one datalayer to another Pin
Evilfish200029-Jun-22 4:14
Evilfish200029-Jun-22 4:14 
AnswerRe: Streaming data from one datalayer to another Pin
Pete O'Hanlon29-Jun-22 20:46
mvePete O'Hanlon29-Jun-22 20:46 
PraiseRe: Streaming data from one datalayer to another Pin
Evilfish200029-Jun-22 21:40
Evilfish200029-Jun-22 21:40 
QuestionC# voice communication between 2 local pcs Pin
Getyourwings UK28-Jun-22 10:07
Getyourwings UK28-Jun-22 10:07 
QuestionIs there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Code4Ever24-Jun-22 2:33
Code4Ever24-Jun-22 2:33 
AnswerRe: Is there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Craig Robbins24-Jun-22 6:33
Craig Robbins24-Jun-22 6:33 
AnswerRe: Is there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Richard MacCutchan24-Jun-22 22:38
mveRichard MacCutchan24-Jun-22 22:38 
QuestionLinq TO SQL DistinctBy Question Pin
Kevin Marois23-Jun-22 18:16
professionalKevin Marois23-Jun-22 18:16 
AnswerRe: Linq TO SQL DistinctBy Question Pin
OriginalGriff23-Jun-22 19:49
mveOriginalGriff23-Jun-22 19:49 
GeneralRe: Linq TO SQL DistinctBy Question Pin
Richard Deeming23-Jun-22 22:36
mveRichard Deeming23-Jun-22 22:36 
AnswerRe: Linq TO SQL DistinctBy Question Pin
Richard Deeming23-Jun-22 22:43
mveRichard Deeming23-Jun-22 22:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.