Click here to Skip to main content
15,867,834 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Use Telerik Split button Pin
NotPolitcallyCorrect12-Jan-17 8:03
NotPolitcallyCorrect12-Jan-17 8:03 
GeneralRe: How to Use Telerik Split button Pin
Member 1293879713-Jan-17 7:50
Member 1293879713-Jan-17 7:50 
GeneralRe: How to Use Telerik Split button Pin
NotPolitcallyCorrect13-Jan-17 8:25
NotPolitcallyCorrect13-Jan-17 8:25 
GeneralRe: How to Use Telerik Split button Pin
Graeme_Grant15-Jan-17 0:26
mvaGraeme_Grant15-Jan-17 0:26 
QuestionFingerprint and mysql database Pin
King_Eke11-Jan-17 11:26
King_Eke11-Jan-17 11:26 
AnswerRe: Fingerprint and mysql database Pin
Gerry Schmitz11-Jan-17 17:00
mveGerry Schmitz11-Jan-17 17:00 
AnswerRe: Fingerprint and mysql database Pin
Afzaal Ahmad Zeeshan11-Jan-17 23:17
professionalAfzaal Ahmad Zeeshan11-Jan-17 23:17 
QuestionCustom Exceptions - Best Practices Pin
JBHowl11-Jan-17 9:23
JBHowl11-Jan-17 9:23 
Hello,

I'm creating a custom exception that I want to display addition information. I have this so far, and it works, but it feels wrong. I was wonder if there was a better way.

C#
public class AccessIOPortException : Exception
   {
       public AccessIOPortException(string message, int port)
           : base("Error while accessing IO port " + port.ToString() + Environment.NewLine + message) { }
   }


and then to call it

<pre lang="c#">
  catch (Exception X)
            {
                Utilities.LogEvent(new AccessIOPortException(X.Message, port));
            }


Any input would be greatly appreciated. Thanks!
AnswerRe: Custom Exceptions - Best Practices Pin
Pete O'Hanlon11-Jan-17 11:48
subeditorPete O'Hanlon11-Jan-17 11:48 
AnswerRe: Custom Exceptions - Best Practices Pin
Gerry Schmitz11-Jan-17 16:55
mveGerry Schmitz11-Jan-17 16:55 
AnswerRe: Custom Exceptions - Best Practices Pin
Richard Deeming12-Jan-17 6:54
mveRichard Deeming12-Jan-17 6:54 
GeneralRe: Custom Exceptions - Best Practices Pin
BillWoodruff22-Jan-17 15:10
professionalBillWoodruff22-Jan-17 15:10 
QuestionC# classes Pin
Bobbla1310-Jan-17 23:17
Bobbla1310-Jan-17 23:17 
GeneralRe: C# classes Pin
harold aptroot10-Jan-17 23:35
harold aptroot10-Jan-17 23:35 
GeneralRe: C# classes Pin
#realJSOP11-Jan-17 7:47
mve#realJSOP11-Jan-17 7:47 
GeneralRe: C# classes Pin
OriginalGriff11-Jan-17 8:03
mveOriginalGriff11-Jan-17 8:03 
GeneralRe: C# classes Pin
#realJSOP12-Jan-17 2:06
mve#realJSOP12-Jan-17 2:06 
AnswerRe: C# classes Pin
Daniel Pfeffer10-Jan-17 23:36
professionalDaniel Pfeffer10-Jan-17 23:36 
AnswerRe: C# classes Pin
Pete O'Hanlon10-Jan-17 23:43
subeditorPete O'Hanlon10-Jan-17 23:43 
AnswerRe: C# classes Pin
Gerry Schmitz11-Jan-17 8:26
mveGerry Schmitz11-Jan-17 8:26 
QuestionHow to dynamically Add and Close tab items in Browser click on add and close buttons Pin
Aniruddha.A10-Jan-17 18:53
Aniruddha.A10-Jan-17 18:53 
AnswerRe: How to dynamically Add and Close tab items in Browser click on add and close buttons Pin
Afzaal Ahmad Zeeshan11-Jan-17 0:03
professionalAfzaal Ahmad Zeeshan11-Jan-17 0:03 
QuestionUse of LevDan.Exif assembly for DNG files?? Pin
Grahame_20059-Jan-17 23:33
Grahame_20059-Jan-17 23:33 
AnswerRe: Use of LevDan.Exif assembly for DNG files?? Pin
Pete O'Hanlon10-Jan-17 2:30
subeditorPete O'Hanlon10-Jan-17 2:30 
GeneralRe: Use of LevDan.Exif assembly for DNG files?? Pin
Grahame_200510-Jan-17 3:43
Grahame_200510-Jan-17 3: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.