-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft updates official lightweight Windows 11 Validation OS with DISM, WPF .NET upgrades
By hellowalkman,
- microsoft
- windows 11
- (and 9 more)
- 0 replies
- 0 views
-
- 0 replies
- 0 views
-
- 0 replies
- 0 views
-
Microsoft releases Microsoft.Extensions.AI .NET libraries for AI application development
By pradeepviswav,
- microsoft
- microsoft ai
- (and 5 more)
- 2 replies
- 4 views
-
Microsoft launches .NET 9 Release Candidate 1 with enhanced WebSocket APIs and more
By John Callaham,
- 1 reply
- 3 views
-
Question
ka-la
I'm working on a small project of mine, and since I do not want to make huge mistakes and errors, trying to get things done the most efficent way possible, I have came across to a problem I think you guys might help me out with.
What am I trying to to? Well, I try to read resources from a DLL file.
The problem? There are Resource Types and Resource Names: Problem comes mostly with names. Some names are integers, some are strings.
I know I could write a two seperate functions, one that reads resource when its name is string, other when its integer. However, I try to come out with a more complex solution, sort of 2in1, one function would act accordingly, if its given type is integer or its string.
So what I have wrote so far:
What I would do is create a resname object before calling the function, then setting the parameters to it, then passing ResName to function, and if one of the parameters is not as it should, it acts accordingly.
Now the question is wheter this is the right way to go about this, or can anyone come out with a better solution?
Link to comment
https://www.neowin.net/forum/topic/1218601-is-this-the-correct-way-playing-with-integers-and-strings/Share on other sites
3 answers to this question
Recommended Posts