Click here to Skip to main content
15,439,556 members
Home / Discussions / C#
   

C#

 
AnswerRe: .NET and c# windows form app Pin
Gerry Schmitz9-Aug-22 9:19
mveGerry Schmitz9-Aug-22 9:19 
QuestionDecoding GBK, .NET 6 edition Pin
harold aptroot8-Aug-22 12:07
Memberharold aptroot8-Aug-22 12:07 
AnswerRe: Decoding GBK, .NET 6 edition Pin
lmoelleb8-Aug-22 22:02
Memberlmoelleb8-Aug-22 22:02 
GeneralRe: Decoding GBK, .NET 6 edition Pin
lmoelleb8-Aug-22 23:22
Memberlmoelleb8-Aug-22 23:22 
AnswerRe: Decoding GBK, .NET 6 edition Pin
Richard Deeming8-Aug-22 22:34
mveRichard Deeming8-Aug-22 22:34 
GeneralRe: Decoding GBK, .NET 6 edition Pin
harold aptroot9-Aug-22 4:44
Memberharold aptroot9-Aug-22 4:44 
QuestionHow to close FileStream without causing an error in PdfViewer Pin
Code4Ever7-Aug-22 20:02
MemberCode4Ever7-Aug-22 20:02 
AnswerRe: How to close FileStream without causing an error in PdfViewer Pin
OriginalGriff7-Aug-22 20:25
mveOriginalGriff7-Aug-22 20:25 
Don't Dispose the stream until you are finished with it: setting a variable to the stream doesn't do anything useful unless the variable is actually a property of a class inheriting from the pdf viewer and does some very naughty loading in the setter.

Once you Dispose a stream, it's closed, and all it's resources are freed immediately: you can't later use the stream to load the data into a control, any more than you can correct the spelling in a letter once you have sealed the envelope.

If you are using memory, then Dispose the stream (and maybe the viewer control) when your user has finished with it, not before.
"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: How to close FileStream without causing an error in PdfViewer Pin
Code4Ever7-Aug-22 20:38
MemberCode4Ever7-Aug-22 20:38 
GeneralRe: How to close FileStream without causing an error in PdfViewer Pin
OriginalGriff7-Aug-22 21:16
mveOriginalGriff7-Aug-22 21:16 
GeneralRe: How to close FileStream without causing an error in PdfViewer Pin
OriginalGriff7-Aug-22 21:59
mveOriginalGriff7-Aug-22 21:59 
AnswerRe: How to close FileStream without causing an error in PdfViewer Pin
Richard Deeming8-Aug-22 0:08
mveRichard Deeming8-Aug-22 0:08 
QuestionFacing problem when calling store procedure from c# code Pin
Mou_kol2-Aug-22 7:52
MemberMou_kol2-Aug-22 7:52 
AnswerRe: Facing problem when calling store procedure from c# code Pin
Richard Deeming2-Aug-22 21:21
mveRichard Deeming2-Aug-22 21:21 
GeneralRe: Facing problem when calling store procedure from c# code Pin
Mou_kol3-Aug-22 3:27
MemberMou_kol3-Aug-22 3:27 
GeneralRe: Facing problem when calling store procedure from c# code Pin
Victor Nijegorodov3-Aug-22 5:33
MemberVictor Nijegorodov3-Aug-22 5:33 
QuestionRe: Facing problem when calling store procedure from c# code Pin
thatraja2-Aug-22 21:36
professionalthatraja2-Aug-22 21:36 
AnswerRe: Facing problem when calling store procedure from c# code Pin
Gerry Schmitz3-Aug-22 5:58
mveGerry Schmitz3-Aug-22 5:58 
QuestionHow to dispose Interaction.Behaviors in WPF Pin
Code4Ever2-Aug-22 5:45
MemberCode4Ever2-Aug-22 5:45 
AnswerRe: How to dispose Interaction.Behaviors in WPF Pin
Gerry Schmitz2-Aug-22 6:21
mveGerry Schmitz2-Aug-22 6:21 
QuestionHow to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 20:38
MemberCode4Ever31-Jul-22 20:38 
AnswerRe: How to set null value to a FOREIGN KEY using EF Core Pin
Richard MacCutchan31-Jul-22 21:37
mveRichard MacCutchan31-Jul-22 21:37 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 21:49
MemberCode4Ever31-Jul-22 21:49 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Richard MacCutchan31-Jul-22 22:06
mveRichard MacCutchan31-Jul-22 22:06 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 22:17
MemberCode4Ever31-Jul-22 22:17 

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.