Click here to Skip to main content
15,895,283 members
Home / Discussions / C#
   

C#

 
QuestionWhat is Out in C# ? Pin
Abdalla Ben Omran25-Apr-19 23:13
Abdalla Ben Omran25-Apr-19 23:13 
AnswerRe: What is Out in C# ? Pin
OriginalGriff25-Apr-19 23:37
mveOriginalGriff25-Apr-19 23:37 
GeneralRe: What is Out in C# ? Pin
Abdalla Ben Omran25-Apr-19 23:50
Abdalla Ben Omran25-Apr-19 23:50 
GeneralRe: What is Out in C# ? Pin
OriginalGriff26-Apr-19 0:03
mveOriginalGriff26-Apr-19 0:03 
QuestionI want to generate/make my predefined variable name in the C# code Pin
Member 1330748425-Apr-19 5:19
Member 1330748425-Apr-19 5:19 
AnswerRe: I want to generate/make my predefined variable name in the C# code Pin
Richard Deeming25-Apr-19 5:36
mveRichard Deeming25-Apr-19 5:36 
GeneralRe: I want to generate/make my predefined variable name in the C# code Pin
#realJSOP25-Apr-19 9:18
mve#realJSOP25-Apr-19 9:18 
AnswerRe: I want to generate/make my predefined variable name in the C# code Pin
OriginalGriff25-Apr-19 6:12
mveOriginalGriff25-Apr-19 6:12 
That's a very poor idea - you can do it using reflection, (but not for local variables since they are stack based, not heap) but that's like using a sledgehammer to crack a nut! It'll work, but that's a load of effort to go to just to break a thin shell...

Instead, consider an array:
C#
private string[] x = new string[100];
...
   x[1] = "Hello";
   x[27] = "Hi";
   x[99] = "Hey";
...
   MessageBox.Show(x[i]);
It really is a much better solution.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

AnswerRe: I want to generate/make my predefined variable name in the C# code Pin
#realJSOP25-Apr-19 9:23
mve#realJSOP25-Apr-19 9:23 
GeneralRe: I want to generate/make my predefined variable name in the C# code Pin
Richard Deeming25-Apr-19 11:24
mveRichard Deeming25-Apr-19 11:24 
GeneralRe: I want to generate/make my predefined variable name in the C# code Pin
#realJSOP25-Apr-19 23:40
mve#realJSOP25-Apr-19 23:40 
QuestionAdventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 3:55
Member 1412218425-Apr-19 3:55 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Ron Nicholson25-Apr-19 5:34
professionalRon Nicholson25-Apr-19 5:34 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 10:36
Member 1412218425-Apr-19 10:36 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
OriginalGriff25-Apr-19 6:17
mveOriginalGriff25-Apr-19 6:17 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 10:44
Member 1412218425-Apr-19 10:44 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
V.25-Apr-19 19:02
professionalV.25-Apr-19 19:02 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218425-Apr-19 21:16
Member 1412218425-Apr-19 21:16 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Ron Nicholson26-Apr-19 5:13
professionalRon Nicholson26-Apr-19 5:13 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218426-Apr-19 21:43
Member 1412218426-Apr-19 21:43 
AnswerRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 8:23
professionalBillWoodruff29-Apr-19 8:23 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
Member 1412218429-Apr-19 10:40
Member 1412218429-Apr-19 10:40 
GeneralRe: Adventure Game & Interactive Fiction - Coding for handling doors. Pin
BillWoodruff29-Apr-19 22:43
professionalBillWoodruff29-Apr-19 22:43 
QuestionHow to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Bastien Vandamme22-Apr-19 17:45
Bastien Vandamme22-Apr-19 17:45 
AnswerRe: How to configure azure-pipeline.yml for asp.net core 2.2 ? Pin
Gerry Schmitz22-Apr-19 18:11
mveGerry Schmitz22-Apr-19 18: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.