Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
AnswerRe: Multiple values in a querystring Pin
sudhanvag10-Jan-09 5:18
sudhanvag10-Jan-09 5:18 
GeneralRe: Multiple values in a querystring Pin
ferronrsmith10-Jan-09 9:55
ferronrsmith10-Jan-09 9:55 
GeneralRe: Multiple values in a querystring Pin
sudhanvag10-Jan-09 15:59
sudhanvag10-Jan-09 15:59 
QuestionRead and copy .docx Pin
Xtrme_XJ9-Jan-09 8:23
Xtrme_XJ9-Jan-09 8:23 
Questionunisgned integers and global cases in C# Pin
Xarzu9-Jan-09 7:54
Xarzu9-Jan-09 7:54 
AnswerRe: unisgned integers and global cases in C# Pin
Eddy Vluggen9-Jan-09 8:24
professionalEddy Vluggen9-Jan-09 8:24 
AnswerRe: unisgned integers and global cases in C# Pin
JByrd20069-Jan-09 9:02
JByrd20069-Jan-09 9:02 
AnswerRe: unisgned integers and global cases in C# Pin
Guffa9-Jan-09 17:52
Guffa9-Jan-09 17:52 
Xarzu wrote:
How would that look like in Visual C#?


It would look better. Smile | :)

You use an enum, which gives it more structure. This will also give you the possible values to use right in the intellisense, so you don't have to wade through loads of header files to find out which constants you can use.
[Flags]
public enum Feeling {
   Happy = 1,
   Hungry = 2,
   Free = 4,
   Cold = 8
}

The Flags attribute enables you to perform bitwise operations on the enum values:
Feeling xarzu = Feeling.Happy | Feeling.Hungry;

if ((xarzu & Feeling.Happy) != 0) MessageBox.Show("Xarzu is happy.");

The data type that the enum uses by default is int, as that's the most efficient type. You can specify a different type like an uint if you like, but there is rarely any reason for that.

Despite everything, the person most likely to be fooling you next is yourself.

Questionany body idea in viterbi algorithm Pin
lawrenceinba9-Jan-09 7:39
lawrenceinba9-Jan-09 7:39 
AnswerRe: any body idea in viterbi algorithm Pin
Christian Graus9-Jan-09 7:46
protectorChristian Graus9-Jan-09 7:46 
GeneralRe: any body idea in viterbi algorithm Pin
lawrenceinba9-Jan-09 8:00
lawrenceinba9-Jan-09 8:00 
AnswerRe: any body idea in viterbi algorithm Pin
EliottA9-Jan-09 8:01
EliottA9-Jan-09 8:01 
GeneralRe: any body idea in viterbi algorithm Pin
Luc Pattyn9-Jan-09 8:20
sitebuilderLuc Pattyn9-Jan-09 8:20 
GeneralRe: any body idea in viterbi algorithm Pin
Eddy Vluggen9-Jan-09 8:40
professionalEddy Vluggen9-Jan-09 8:40 
GeneralRe: any body idea in viterbi algorithm Pin
Luc Pattyn9-Jan-09 9:55
sitebuilderLuc Pattyn9-Jan-09 9:55 
GeneralRe: any body idea in viterbi algorithm Pin
Eddy Vluggen9-Jan-09 11:03
professionalEddy Vluggen9-Jan-09 11:03 
QuestionHow to export a bitmap from a crystal report? Pin
davebarkshire9-Jan-09 6:00
davebarkshire9-Jan-09 6:00 
AnswerRe: How to export a bitmap from a crystal report? Pin
DaveyM699-Jan-09 7:11
professionalDaveyM699-Jan-09 7:11 
GeneralRe: How to export a bitmap from a crystal report? Pin
c0ax_lx12-Jan-09 2:02
c0ax_lx12-Jan-09 2:02 
GeneralRe: How to export a bitmap from a crystal report? Pin
DaveyM6912-Jan-09 6:31
professionalDaveyM6912-Jan-09 6:31 
GeneralRe: How to export a bitmap from a crystal report? Pin
c0ax_lx12-Jan-09 22:17
c0ax_lx12-Jan-09 22:17 
GeneralRe: How to export a bitmap from a crystal report? Pin
DaveyM6913-Jan-09 1:13
professionalDaveyM6913-Jan-09 1:13 
GeneralRe: How to export a bitmap from a crystal report? Pin
DaveyM6913-Jan-09 1:14
professionalDaveyM6913-Jan-09 1:14 
QuestionHow to play flash Pin
Sokka939-Jan-09 5:59
Sokka939-Jan-09 5:59 
AnswerRe: How to play flash Pin
EliottA9-Jan-09 6:11
EliottA9-Jan-09 6:11 

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.