Click here to Skip to main content
15,793,442 members
Home / Discussions / C#
   

C#

 
QuestionWinform support in Windows service Pin
Member 1260803930-Dec-21 0:59
Member 1260803930-Dec-21 0:59 
AnswerRe: Winform support in Windows service Pin
OriginalGriff30-Dec-21 1:27
mvaOriginalGriff30-Dec-21 1:27 
GeneralRe: Winform support in Windows service Pin
Member 1260803930-Dec-21 2:28
Member 1260803930-Dec-21 2:28 
GeneralRe: Winform support in Windows service Pin
OriginalGriff30-Dec-21 3:08
mvaOriginalGriff30-Dec-21 3:08 
AnswerRe: Winform support in Windows service Pin
#realJSOP30-Dec-21 2:20
mve#realJSOP30-Dec-21 2:20 
QuestionDynamically change int from a string Pin
Matte Matik29-Dec-21 13:02
Matte Matik29-Dec-21 13:02 
AnswerRe: Dynamically change int from a string Pin
Dave Kreskowiak29-Dec-21 13:36
mveDave Kreskowiak29-Dec-21 13:36 
AnswerRe: Dynamically change int from a string Pin
OriginalGriff29-Dec-21 22:53
mvaOriginalGriff29-Dec-21 22:53 
You are going to have to be a lot clearer about exactly what you want to do - you can't have "quoted strings" as variable names.

If you want to be able to associate a string "name" with a value and access it later by the name, then probably what you want to do is look at a Dictionary:
C#
Dictionary<string, int> items = new Dictionary<string, int>();
for (int i = 500; i >= 350; i--)
    {
    string combine = $"offset_y_bar_{i}";
    items[combine] = i;
    }
Console.WriteLine(items["offset_y_bar_421"]);

"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

QuestionC# Entity Framework : how to generate custom automatic numbers Pin
Fidele Okito27-Dec-21 5:50
Fidele Okito27-Dec-21 5:50 
AnswerRe: C# Entity Framework : how to generate custom automatic numbers Pin
Gerry Schmitz27-Dec-21 6:16
mveGerry Schmitz27-Dec-21 6:16 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Fidele Okito27-Dec-21 6:32
Fidele Okito27-Dec-21 6:32 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Gerry Schmitz27-Dec-21 7:45
mveGerry Schmitz27-Dec-21 7:45 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Fidele Okito27-Dec-21 8:55
Fidele Okito27-Dec-21 8:55 
AnswerRe: C# Entity Framework : how to generate custom automatic numbers Pin
#realJSOP28-Dec-21 1:24
mve#realJSOP28-Dec-21 1:24 
AnswerRe: C# Entity Framework : how to generate custom automatic numbers Pin
jschell29-Dec-21 8:17
jschell29-Dec-21 8:17 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Gerry Schmitz29-Dec-21 16:22
mveGerry Schmitz29-Dec-21 16:22 
JokeRe: C# Entity Framework : how to generate custom automatic numbers Pin
Peter_in_278029-Dec-21 16:32
professionalPeter_in_278029-Dec-21 16:32 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Gerry Schmitz29-Dec-21 16:54
mveGerry Schmitz29-Dec-21 16:54 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
jschell30-Dec-21 8:31
jschell30-Dec-21 8:31 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Gerry Schmitz30-Dec-21 10:23
mveGerry Schmitz30-Dec-21 10:23 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
jschell23-Jan-22 8:01
jschell23-Jan-22 8:01 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Fidele Okito30-Dec-21 4:14
Fidele Okito30-Dec-21 4:14 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
jschell30-Dec-21 8:26
jschell30-Dec-21 8:26 
GeneralRe: C# Entity Framework : how to generate custom automatic numbers Pin
Fidele Okito30-Dec-21 9:57
Fidele Okito30-Dec-21 9:57 
QuestionFull path Crystal report on client server in c# Pin
remiki26-Dec-21 23:54
remiki26-Dec-21 23:54 

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.