Click here to Skip to main content
15,882,241 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is possible to use the same background process for all forms? Pin
OriginalGriff22-Jan-23 18:49
mveOriginalGriff22-Jan-23 18:49 
AnswerRe: Is possible to use the same background process for all forms? Pin
jschell24-Jan-23 10:27
jschell24-Jan-23 10:27 
Question"the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 3:17
professionalBillWoodruff15-Jan-23 3:17 
AnswerRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 4:00
mveOriginalGriff15-Jan-23 4:00 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 4:48
professionalBillWoodruff15-Jan-23 4:48 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
Graeme_Grant15-Jan-23 5:00
mvaGraeme_Grant15-Jan-23 5:00 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 5:20
professionalBillWoodruff15-Jan-23 5:20 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 5:07
mveOriginalGriff15-Jan-23 5:07 
Yes, that's what the warning is there for: to make sure you are doing what you intended, not accidentally hiding the original.

You don't get any exception because it is legal: it's a compile time problem only (and because it's a warning, it assumes the new for you).

Try going to your project properties, "Build" tab, and selecting "Treat warnings as error" to "All" - that should cause a compiler problem with that code.
My default new project includes that setting!
"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: "the horror:" why does C# let me get away with this ? Pin
Graeme_Grant15-Jan-23 5:11
mvaGraeme_Grant15-Jan-23 5:11 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 5:37
mveOriginalGriff15-Jan-23 5:37 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
Graeme_Grant15-Jan-23 5:47
mvaGraeme_Grant15-Jan-23 5:47 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 5:55
mveOriginalGriff15-Jan-23 5:55 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 16:52
professionalBillWoodruff15-Jan-23 16:52 
PraiseRe: "the horror:" why does C# let me get away with this ? Pin
RedDk15-Jan-23 5:31
RedDk15-Jan-23 5:31 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 5:39
mveOriginalGriff15-Jan-23 5:39 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
Richard MacCutchan15-Jan-23 6:32
mveRichard MacCutchan15-Jan-23 6:32 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
OriginalGriff15-Jan-23 7:34
mveOriginalGriff15-Jan-23 7:34 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
RedDk15-Jan-23 6:49
RedDk15-Jan-23 6:49 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 16:57
professionalBillWoodruff15-Jan-23 16:57 
AnswerRe: "the horror:" why does C# let me get away with this ? Pin
jschell15-Jan-23 8:05
jschell15-Jan-23 8:05 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
BillWoodruff15-Jan-23 17:13
professionalBillWoodruff15-Jan-23 17:13 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
lmoelleb17-Jan-23 23:10
lmoelleb17-Jan-23 23:10 
GeneralRe: "the horror:" why does C# let me get away with this ? Pin
jschell22-Jan-23 8:30
jschell22-Jan-23 8:30 
QuestionImageAnnotationDemo Pin
Rahmo14-Jan-23 22:50
Rahmo14-Jan-23 22:50 
AnswerRe: ImageAnnotationDemo Pin
Richard MacCutchan15-Jan-23 1:34
mveRichard MacCutchan15-Jan-23 1:34 

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.