|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Bitwise operations
can it be done in C#? Any help, I new to programming and would like to use the helpful feature.
const ulong VOLATILITY_DISPLAY_PERFORMANCE =1; const ulong VOLATILITY_DISPLAY_STANDARDDEVIATION =2; const ulong VOLATILITY_DISPLAY_ARITHMETICMEAN =4; const ulong VOLATILITY_DISPLAY_EFFICIENCYINDEX =8; const ulong VOLATILITY_DISPLAY_SHARPE =16; const ulong VOLATILITY_DISPLAY_VARIANCE =32; const ulong VOLATILITY_DISPLAY_ALPHA =64; const ulong VOLATILITY_DISPLAY_BETA =128; const ulong VOLATILITY_DISPLAY_TREYNOR =256; long value = VOLATILITY_DISPLAY_PERFORMANCE + VOLATILITY_DISPLAY_SHARPE; /8it throws a compiler error for next line*/ if(value & VOLATILITY_DISPLAY_SHARPE) /* == TRUE */ { /*DO SOME THING*/ } |
|
#2
|
|||
|
|||
|
Try if(value & VOLATILITY_DISPLAY_SHARPE == VOLATILITY_DISPLAY_SHARPE)
Hadley |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Bitwise operations |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|