Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get the value of contextExpression from xml file using Linq to xml in c# Pin
Member 1137760515-Jan-15 5:11
Member 1137760515-Jan-15 5:11 
QuestionConverting enum numeric value to ASCII in byte? Pin
TMattC14-Jan-15 8:56
TMattC14-Jan-15 8:56 
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
PIEBALDconsult14-Jan-15 9:02
mvePIEBALDconsult14-Jan-15 9:02 
GeneralRe: Converting enum numeric value to ASCII in byte? Pin
TMattC14-Jan-15 9:22
TMattC14-Jan-15 9:22 
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
Richard Andrew x6414-Jan-15 9:03
professionalRichard Andrew x6414-Jan-15 9:03 
GeneralRe: Converting enum numeric value to ASCII in byte? Pin
PIEBALDconsult14-Jan-15 9:06
mvePIEBALDconsult14-Jan-15 9:06 
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
Rob Philpott14-Jan-15 9:51
Rob Philpott14-Jan-15 9:51 
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
Daniel Pfeffer14-Jan-15 23:53
professionalDaniel Pfeffer14-Jan-15 23:53 
Yet another option would be a conversion function as follows:

C#
enum PackageType : byte { STANDARD, REQUEST, ANSWER }

static readonly byte[] PackageTypeValues = { (byte)'1', (byte)'2', (byte)'3' };

byte PackageTypeToByte( PackageType packageType )
{
    return PackageTypeValues[(byte)packageType];
}


This has the advantage of separating the enumeration values from their display tokens, allowing you to change one without changing the other. The disadvantage is that they can become unsynchronized...
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
BillWoodruff15-Jan-15 1:30
professionalBillWoodruff15-Jan-15 1:30 
AnswerRe: Converting enum numeric value to ASCII in byte? Pin
Nitin Gupta116-Jan-15 2:17
Nitin Gupta116-Jan-15 2:17 
QuestionLaunch Explorer from another Program and Autofill Username and Password Pin
picardy14-Jan-15 2:20
picardy14-Jan-15 2:20 
AnswerRe: Launch Explorer from another Program and Autofill Username and Password Pin
Eddy Vluggen14-Jan-15 3:00
professionalEddy Vluggen14-Jan-15 3:00 
GeneralRe: Launch Explorer from another Program and Autofill Username and Password Pin
picardy14-Jan-15 5:14
picardy14-Jan-15 5:14 
GeneralRe: Launch Explorer from another Program and Autofill Username and Password Pin
Eddy Vluggen14-Jan-15 5:20
professionalEddy Vluggen14-Jan-15 5:20 
QuestionVS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Member 1131412813-Jan-15 8:40
Member 1131412813-Jan-15 8:40 
AnswerRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Afzaal Ahmad Zeeshan13-Jan-15 10:15
professionalAfzaal Ahmad Zeeshan13-Jan-15 10:15 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Agent__00713-Jan-15 17:36
professionalAgent__00713-Jan-15 17:36 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Member 1131412813-Jan-15 20:29
Member 1131412813-Jan-15 20:29 
GeneralRe: VS2013 ASP.NET MVC, context menu for Model defaults to Add Controller? Pin
Member 1131412813-Jan-15 20:30
Member 1131412813-Jan-15 20:30 
QuestionGetting audio waveform out of video Pin
mtst9913-Jan-15 7:56
mtst9913-Jan-15 7:56 
Answerhow to retrive a data from database sql to c#....using search button Pin
Member 1137235413-Jan-15 4:51
Member 1137235413-Jan-15 4:51 
GeneralRe: how to retrive a data from database sql to c#....using search button Pin
OriginalGriff13-Jan-15 5:05
mveOriginalGriff13-Jan-15 5:05 
QuestionConvert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 1:41
WrightSfiso13-Jan-15 1:41 
AnswerRe: Convert VB.Net Project to C# Pin
OriginalGriff13-Jan-15 1:49
mveOriginalGriff13-Jan-15 1:49 
GeneralRe: Convert VB.Net Project to C# Pin
WrightSfiso13-Jan-15 2:41
WrightSfiso13-Jan-15 2:41 

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.