Click here to Skip to main content
15,793,277 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
Pete O'Hanlon4-Jul-22 0:54
subeditorPete O'Hanlon4-Jul-22 0:54 
GeneralRe: Visual Studio Web Performance and Load Testing Tools alternative Pin
j11codep4-Jul-22 1:18
j11codep4-Jul-22 1:18 
QuestionLinq to SQL With Enum On Null Field [MODIFIED] Pin
Kevin Marois1-Jul-22 18:49
professionalKevin Marois1-Jul-22 18:49 
AnswerRe: Linq to SQL With Enum On Null Field Pin
OriginalGriff1-Jul-22 19:43
mvaOriginalGriff1-Jul-22 19:43 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 10:40
professionalKevin Marois2-Jul-22 10:40 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Dave Kreskowiak2-Jul-22 10:49
mveDave Kreskowiak2-Jul-22 10:49 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 10:59
professionalKevin Marois2-Jul-22 10:59 
GeneralRe: Linq to SQL With Enum On Null Field Pin
OriginalGriff2-Jul-22 10:52
mvaOriginalGriff2-Jul-22 10: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 10:59
professionalKevin Marois2-Jul-22 10:59 
QuestionRe: Linq to SQL With Enum On Null Field Pin
Eddy Vluggen2-Jul-22 11:37
professionalEddy Vluggen2-Jul-22 11:37 
AnswerRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 15:58
professionalKevin Marois2-Jul-22 15:58 
AnswerRe: Linq to SQL With Enum On Null Field Pin
Dave Kreskowiak2-Jul-22 5:59
mveDave Kreskowiak2-Jul-22 5:59 
GeneralRe: Linq to SQL With Enum On Null Field Pin
Kevin Marois2-Jul-22 10:43
professionalKevin Marois2-Jul-22 10:43 
AnswerRe: Linq to SQL With Enum On Null Field [MODIFIED] Pin
Richard Deeming4-Jul-22 22:40
mveRichard Deeming4-Jul-22 22:40 
QuestionStreaming data from one datalayer to another Pin
Evilfish200029-Jun-22 5:14
Evilfish200029-Jun-22 5:14 
AnswerRe: Streaming data from one datalayer to another Pin
Pete O'Hanlon29-Jun-22 21:46
subeditorPete O'Hanlon29-Jun-22 21:46 
PraiseRe: Streaming data from one datalayer to another Pin
Evilfish200029-Jun-22 22:40
Evilfish200029-Jun-22 22:40 
QuestionC# voice communication between 2 local pcs Pin
Getyourwings UK28-Jun-22 11:07
Getyourwings UK28-Jun-22 11:07 
QuestionIs there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Code4Ever24-Jun-22 3:33
Code4Ever24-Jun-22 3:33 
AnswerRe: Is there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Craig Robbins24-Jun-22 7:33
Craig Robbins24-Jun-22 7:33 
AnswerRe: Is there anything that Python or Java can do for windows GUI applications while C# can't ? Pin
Richard MacCutchan24-Jun-22 23:38
mveRichard MacCutchan24-Jun-22 23:38 
QuestionLinq TO SQL DistinctBy Question Pin
Kevin Marois23-Jun-22 19:16
professionalKevin Marois23-Jun-22 19:16 
AnswerRe: Linq TO SQL DistinctBy Question Pin
OriginalGriff23-Jun-22 20:49
mvaOriginalGriff23-Jun-22 20:49 
GeneralRe: Linq TO SQL DistinctBy Question Pin
Richard Deeming23-Jun-22 23:36
mveRichard Deeming23-Jun-22 23:36 
AnswerRe: Linq TO SQL DistinctBy Question Pin
Richard Deeming23-Jun-22 23:43
mveRichard Deeming23-Jun-22 23: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.