Click here to Skip to main content
15,905,612 members
Home / Discussions / C#
   

C#

 
GeneralClose Windows Form automatically Pin
realmontanakid2-Dec-04 6:27
realmontanakid2-Dec-04 6:27 
GeneralRe: Close Windows Form automatically Pin
Judah Gabriel Himango2-Dec-04 7:34
sponsorJudah Gabriel Himango2-Dec-04 7:34 
GeneralRe: Close Windows Form automatically Pin
Heath Stewart2-Dec-04 7:40
protectorHeath Stewart2-Dec-04 7:40 
GeneralChange text color on a single line Pin
Gywox2-Dec-04 5:45
Gywox2-Dec-04 5:45 
GeneralTest for file lock Pin
Marc Clifton2-Dec-04 5:16
mvaMarc Clifton2-Dec-04 5:16 
GeneralRe: Test for file lock Pin
Heath Stewart2-Dec-04 5:31
protectorHeath Stewart2-Dec-04 5:31 
GeneralRe: Test for file lock Pin
Marc Clifton2-Dec-04 6:04
mvaMarc Clifton2-Dec-04 6:04 
GeneralRe: Test for file lock Pin
Heath Stewart2-Dec-04 7:34
protectorHeath Stewart2-Dec-04 7:34 
Marc Clifton wrote:
There is no CreateFile method in the .NET FileStream implementation.

Yes, this I know. But if you look at the context, I was talking about native APIs, so I was talking about the native CreateFile API.

Exceptions can be abused, but I think the BCL has a pretty tight reign on them. I see abuses mostly in third-party code (the "less commercial" kind), or just a complete absence of throwing - and especially catching - them.

I personally like them (and other exception mechanisms, like SEH) better than return codes. You don't have to add different conditions with different localized texts (unless you're defining your own exceptions or using your own text, for that matter). The code impact is minimal, but I realize they do cause a slight performance drain to throw, as opposed to just returning an error code. I guess it's really just a matter of opinion, though.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Test for file lock Pin
Willie Lassiter5-Dec-04 17:55
Willie Lassiter5-Dec-04 17:55 
GeneralConverting string to bitmap Pin
jawbrey2-Dec-04 5:15
jawbrey2-Dec-04 5:15 
GeneralRe: Converting string to bitmap Pin
Heath Stewart2-Dec-04 7:17
protectorHeath Stewart2-Dec-04 7:17 
GeneralBrowse all controls Pin
bouli2-Dec-04 4:34
bouli2-Dec-04 4:34 
GeneralRe: Browse all controls Pin
Judah Gabriel Himango2-Dec-04 4:58
sponsorJudah Gabriel Himango2-Dec-04 4:58 
GeneralRe: Browse all controls Pin
bouli2-Dec-04 5:02
bouli2-Dec-04 5:02 
GeneralRe: Browse all controls Pin
Heath Stewart2-Dec-04 5:20
protectorHeath Stewart2-Dec-04 5:20 
GeneralRe: Browse all controls Pin
bouli2-Dec-04 5:30
bouli2-Dec-04 5:30 
GeneralRe: Browse all controls Pin
Heath Stewart2-Dec-04 5:35
protectorHeath Stewart2-Dec-04 5:35 
GeneralRe: Browse all controls Pin
Judah Gabriel Himango2-Dec-04 5:37
sponsorJudah Gabriel Himango2-Dec-04 5:37 
GeneralRe: Browse all controls Pin
Heath Stewart2-Dec-04 7:30
protectorHeath Stewart2-Dec-04 7:30 
GeneralRe: Browse all controls Pin
turbochimp2-Dec-04 5:08
turbochimp2-Dec-04 5:08 
GeneralProblem with string literals Pin
pchak2-Dec-04 4:18
pchak2-Dec-04 4:18 
GeneralRe: Problem with string literals Pin
turbochimp2-Dec-04 4:50
turbochimp2-Dec-04 4:50 
GeneralRe: Problem with string literals Pin
pchak2-Dec-04 5:30
pchak2-Dec-04 5:30 
Generalconnection path for database Pin
steve_rm2-Dec-04 4:18
steve_rm2-Dec-04 4:18 
GeneralRe: connection path for database Pin
turbochimp2-Dec-04 4:35
turbochimp2-Dec-04 4:35 

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.