Click here to Skip to main content
15,908,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert from Base 64 to hexadecimal value Pin
NJdotnetdev13-Jan-15 8:48
NJdotnetdev13-Jan-15 8:48 
Questionusing sData in C# to post sales Pin
Jassim Rahma7-Jan-15 20:33
Jassim Rahma7-Jan-15 20:33 
AnswerRe: using sData in C# to post sales Pin
Mycroft Holmes7-Jan-15 21:02
professionalMycroft Holmes7-Jan-15 21:02 
AnswerRe: using sData in C# to post sales Pin
Richard MacCutchan7-Jan-15 22:51
mveRichard MacCutchan7-Jan-15 22:51 
QuestionABOUT C# PROJECT Pin
bhulku Swati7-Jan-15 16:33
bhulku Swati7-Jan-15 16:33 
AnswerRe: ABOUT C# PROJECT Pin
BillWoodruff7-Jan-15 16:55
professionalBillWoodruff7-Jan-15 16:55 
AnswerRe: ABOUT C# PROJECT Pin
Pete O'Hanlon7-Jan-15 20:29
mvePete O'Hanlon7-Jan-15 20:29 
AnswerRe: ABOUT C# PROJECT Pin
Swinkaran8-Jan-15 10:12
professionalSwinkaran8-Jan-15 10:12 
QuestionWhy is happening this error: Object synchronization method was called from an unsynchronized block of code. ? Pin
FANMixco7-Jan-15 8:38
FANMixco7-Jan-15 8:38 
AnswerRe: Why is happening this error: Object synchronization method was called from an unsynchronized block of code. ? PinPopular
Richard Deeming7-Jan-15 8:57
mveRichard Deeming7-Jan-15 8:57 
GeneralRe: Why is happening this error: Object synchronization method was called from an unsynchronized block of code. ? Pin
OriginalGriff7-Jan-15 8:59
mveOriginalGriff7-Jan-15 8:59 
QuestionI'm looking for instructions to convert a demo project into a class Pin
turbosupramk37-Jan-15 5:00
turbosupramk37-Jan-15 5:00 
AnswerRe: I'm looking for instructions to convert a demo project into a class Pin
OriginalGriff7-Jan-15 5:23
mveOriginalGriff7-Jan-15 5:23 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
turbosupramk37-Jan-15 8:00
turbosupramk37-Jan-15 8:00 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
OriginalGriff7-Jan-15 8:27
mveOriginalGriff7-Jan-15 8:27 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
turbosupramk37-Jan-15 8:49
turbosupramk37-Jan-15 8:49 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
OriginalGriff7-Jan-15 8:58
mveOriginalGriff7-Jan-15 8:58 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
turbosupramk37-Jan-15 9:12
turbosupramk37-Jan-15 9:12 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
OriginalGriff7-Jan-15 10:09
mveOriginalGriff7-Jan-15 10:09 
AnswerRe: I'm looking for instructions to convert a demo project into a class Pin
V.7-Jan-15 10:35
professionalV.7-Jan-15 10:35 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
Mycroft Holmes7-Jan-15 13:42
professionalMycroft Holmes7-Jan-15 13:42 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
turbosupramk38-Jan-15 4:58
turbosupramk38-Jan-15 4:58 
GeneralRe: I'm looking for instructions to convert a demo project into a class Pin
V.8-Jan-15 10:04
professionalV.8-Jan-15 10:04 
QuestionBinding one to many (bindingsource / datasource ) Pin
rudo327-Jan-15 4:52
rudo327-Jan-15 4:52 
Questionenums Pin
Gilbert Consellado6-Jan-15 21:21
professionalGilbert Consellado6-Jan-15 21:21 
for example i have

C#
[System.Flags]
public enum PrescriptionTypePrint
{
  PrescriptionOnly = 1,
  InstructionOnly = 2,
  Both = PrescriptionOnly | InstructionOnly
}


how i could make it simplify replacing the || to | on the code below
C#
PrescriptionTypePrint pp = PrescriptionTypePrint.Both;

if (pp == PrescriptionTypePrint.PrescriptionOnly || pp == PrescriptionTypePrint.Both)
{
  //execute this block
}


becuase i think this would not work
C#
if (pp == (PrescriptionTypePrint.PrescriptionOnly | PrescriptionTypePrint.Both))
{
  //execute this block
}
// the goal of this if pp has a value of prescription or both it will execute.


thank you so much for the some one who shed me some light

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.