Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: C#, process, TPL tasks, following a process Pin
Dwayne Barsotta13-Mar-18 19:31
Dwayne Barsotta13-Mar-18 19:31 
GeneralRe: C#, process, TPL tasks, following a process Pin
Gerry Schmitz14-Mar-18 6:30
mveGerry Schmitz14-Mar-18 6:30 
GeneralRe: C#, process, TPL tasks, following a process Pin
Matt T Heffron15-Mar-18 8:13
professionalMatt T Heffron15-Mar-18 8:13 
GeneralRe: C#, process, TPL tasks, following a process Pin
Gerry Schmitz15-Mar-18 11:32
mveGerry Schmitz15-Mar-18 11:32 
Questionmethod and parameters Pin
Member 137173708-Mar-18 23:50
Member 137173708-Mar-18 23:50 
AnswerRe: method and parameters Pin
OriginalGriff8-Mar-18 23:56
mveOriginalGriff8-Mar-18 23:56 
GeneralRe: method and parameters Pin
Member 137173709-Mar-18 0:19
Member 137173709-Mar-18 0:19 
GeneralRe: method and parameters Pin
Richard Deeming9-Mar-18 0:36
mveRichard Deeming9-Mar-18 0:36 
You just need to change the parameter and constant types to sbyte:
C#
const sbyte Up = 1;
const sbyte Down = -1;

void WijzigVerdieping(sbyte direction = Up)
{
    etage += direction;
    lblHuidigeVerdieping.Content = etage.ToString();
}

However, you need to bear in mind that .NET enum types aren't limited to the named values; they're only limited to the range of the underlying type. If you start with drie and add 1, you'll get 4.

That may or may not be a problem, depending on your requirements.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: method and parameters Pin
Member 137173709-Mar-18 0:47
Member 137173709-Mar-18 0:47 
GeneralRe: method and parameters Pin
OriginalGriff9-Mar-18 1:24
mveOriginalGriff9-Mar-18 1:24 
AnswerRe: method and parameters Pin
#realJSOP9-Mar-18 6:20
mve#realJSOP9-Mar-18 6:20 
AnswerRe: method and parameters Pin
Luc Pattyn9-Mar-18 9:20
sitebuilderLuc Pattyn9-Mar-18 9:20 
AnswerRe: method and parameters Pin
BillWoodruff10-Mar-18 18:43
professionalBillWoodruff10-Mar-18 18:43 
QuestionWPF: Groupbox background image Pin
Hervend8-Mar-18 19:12
Hervend8-Mar-18 19:12 
AnswerRe: WPF: Groupbox background image Pin
Richard MacCutchan8-Mar-18 20:58
mveRichard MacCutchan8-Mar-18 20:58 
QuestionEditing text in body of email via Outlook add-in Pin
Rakanoth8-Mar-18 0:03
Rakanoth8-Mar-18 0:03 
GeneralRe: Editing text in body of email via Outlook add-in Pin
Richard MacCutchan8-Mar-18 0:08
mveRichard MacCutchan8-Mar-18 0:08 
GeneralRe: Editing text in body of email via Outlook add-in Pin
Eddy Vluggen8-Mar-18 0:13
professionalEddy Vluggen8-Mar-18 0:13 
GeneralRe: Editing text in body of email via Outlook add-in Pin
Richard MacCutchan8-Mar-18 0:15
mveRichard MacCutchan8-Mar-18 0:15 
GeneralRe: Editing text in body of email via Outlook add-in Pin
Eddy Vluggen8-Mar-18 0:21
professionalEddy Vluggen8-Mar-18 0:21 
AnswerRe: Editing text in body of email via Outlook add-in Pin
Eddy Vluggen8-Mar-18 0:24
professionalEddy Vluggen8-Mar-18 0:24 
AnswerRe: Editing text in body of email via Outlook add-in Pin
Rakanoth8-Mar-18 22:48
Rakanoth8-Mar-18 22:48 
Questionhow can i set windows form over other programs at the desktop in c# Pin
galba20185-Mar-18 22:11
galba20185-Mar-18 22:11 
AnswerRe: how can i set windows form over other programs at the desktop in c# Pin
OriginalGriff5-Mar-18 22:31
mveOriginalGriff5-Mar-18 22:31 
AnswerRe: how can i set windows form over other programs at the desktop in c# PinPopular
Eddy Vluggen6-Mar-18 1:10
professionalEddy Vluggen6-Mar-18 1:10 

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.