Click here to Skip to main content
16,003,902 members
Home / Discussions / C#
   

C#

 
Questionpublic variable Pin
md_refay12-Aug-06 9:46
md_refay12-Aug-06 9:46 
AnswerRe: public variable Pin
Ista12-Aug-06 10:01
Ista12-Aug-06 10:01 
AnswerRe: public variable Pin
Judah Gabriel Himango12-Aug-06 11:04
sponsorJudah Gabriel Himango12-Aug-06 11:04 
Questionbitmap being dragged does not appear as the actual size Pin
Ista12-Aug-06 9:45
Ista12-Aug-06 9:45 
AnswerRe: bitmap being dragged does not appear as the actual size Pin
Ista12-Aug-06 10:34
Ista12-Aug-06 10:34 
QuestionA very beginer question Pin
allende12-Aug-06 9:01
allende12-Aug-06 9:01 
AnswerRe: A very beginer question [modified] Pin
User 665812-Aug-06 9:28
User 665812-Aug-06 9:28 
AnswerRe: A very beginer question Pin
Judah Gabriel Himango12-Aug-06 11:18
sponsorJudah Gabriel Himango12-Aug-06 11:18 
Perhaps an enum is what you're looking for?

public enum Priorities
{
   High = 10,
   Medium = 5,
   Low = 1
}

...

// When you need to use it:
int priority = (int)Priorities.High;


Typically, you don't deal with "globals" per se; everything is contained in a class. Now, if you truely do need a 1 instance class with values in those, you can look into using a static class. But there are only rare occassions for this; whenever I see lots of static classes, especially those that share state between other classes, I immediately think "bad design".

Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: A very beginer question [modified] Pin
allende12-Aug-06 11:25
allende12-Aug-06 11:25 
QuestionData Grids Pin
HasithaKavirathna12-Aug-06 8:58
HasithaKavirathna12-Aug-06 8:58 
AnswerRe: Data Grids Pin
CooperWu13-Aug-06 0:31
CooperWu13-Aug-06 0:31 
QuestionPassing Parameter in ... Pin
mostafa_h12-Aug-06 6:46
mostafa_h12-Aug-06 6:46 
AnswerRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 0:32
CooperWu13-Aug-06 0:32 
GeneralRe: Passing Parameter in ... Pin
mostafa_h13-Aug-06 8:41
mostafa_h13-Aug-06 8:41 
GeneralRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 16:15
CooperWu13-Aug-06 16:15 
GeneralRe: Passing Parameter in ... Pin
mostafa_h13-Aug-06 21:24
mostafa_h13-Aug-06 21:24 
GeneralRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 21:31
CooperWu13-Aug-06 21:31 
GeneralRe: Passing Parameter in ... Pin
mostafa_h14-Aug-06 0:16
mostafa_h14-Aug-06 0:16 
GeneralRe: Passing Parameter in ... Pin
CooperWu14-Aug-06 1:43
CooperWu14-Aug-06 1:43 
Questionpassword Pin
skyeddie12-Aug-06 4:49
skyeddie12-Aug-06 4:49 
AnswerRe: password Pin
CooperWu13-Aug-06 0:34
CooperWu13-Aug-06 0:34 
QuestionHow do others make a shareware registration system? Pin
Stick^12-Aug-06 4:13
Stick^12-Aug-06 4:13 
AnswerRe: How do others make a shareware registration system? Pin
mav.northwind12-Aug-06 5:17
mav.northwind12-Aug-06 5:17 
QuestionClick 'Start Debugging' but nothing happens Pin
J Liang12-Aug-06 3:57
J Liang12-Aug-06 3:57 
AnswerRe: Click 'Start Debugging' but nothing happens Pin
Rob Graham12-Aug-06 4:16
Rob Graham12-Aug-06 4:16 

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.