Click here to Skip to main content
14,327,288 members
   

C#

 
GeneralRe: call enum as argument in Method? Pin
BillWoodruff7-Sep-19 15:36
mveBillWoodruff7-Sep-19 15:36 
GeneralRe: call enum as argument in Method? Pin
Dave Kreskowiak7-Sep-19 17:21
mveDave Kreskowiak7-Sep-19 17:21 
GeneralRe: call enum as argument in Method? Pin
BillWoodruff7-Sep-19 19:04
mveBillWoodruff7-Sep-19 19:04 
GeneralRe: call enum as argument in Method? Pin
Member 145823347-Sep-19 16:32
memberMember 145823347-Sep-19 16:32 
GeneralRe: call enum as argument in Method? Pin
BillWoodruff7-Sep-19 19:02
mveBillWoodruff7-Sep-19 19:02 
AnswerRe: call enum as argument in Method? Pin
BillWoodruff7-Sep-19 15:29
mveBillWoodruff7-Sep-19 15:29 
AnswerRe: call enum as argument in Method? Pin
BillWoodruff7-Sep-19 19:01
mveBillWoodruff7-Sep-19 19:01 
AnswerRe: call enum as argument in Method? Pin
OriginalGriff7-Sep-19 20:03
protectorOriginalGriff7-Sep-19 20:03 
To add to what the others say: never rely on variable names in your code in the way you seem to be describing. While (as Dave says) that can be done, it does have a significant drawback in the real world.
Namely: it may fail spectacularly in production. It's quite common to use obfuscation to "protect" source code from re-generation from the EXE file - which is certainly possible in C# thanks to the metadata that Dave mentioned.
But obfuscation throws away that metadata and substitutes a randomised version to make it a lot harder to read. And there go your enum names, your variables, even your method names (unless they are directly exposed outside the assembly).

Generally, if you are trying to do that, you are over complicating your software, and probably should sit down and think very carefully if that is the way you need to go.
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: call enum as argument in Method? Pin
Gerry Schmitz8-Sep-19 8:09
mveGerry Schmitz8-Sep-19 8:09 
AnswerRe: call enum as argument in Method? Pin
Sharp Ninja9-Sep-19 4:56
memberSharp Ninja9-Sep-19 4:56 
QuestionVlookup a Value on a CSV file C# Pin
Member 1457406731-Aug-19 9:52
memberMember 1457406731-Aug-19 9:52 
AnswerRe: Vlookup a Value on a CSV file C# Pin
OriginalGriff31-Aug-19 19:55
protectorOriginalGriff31-Aug-19 19:55 
AnswerRe: Vlookup a Value on a CSV file C# Pin
BillWoodruff1-Sep-19 12:00
mveBillWoodruff1-Sep-19 12:00 
Questionreading text file as an array by using streamreader Pin
Member 1457152028-Aug-19 19:37
memberMember 1457152028-Aug-19 19:37 
AnswerRe: reading text file as an array by using streamreader Pin
OriginalGriff28-Aug-19 19:56
protectorOriginalGriff28-Aug-19 19:56 
AnswerRe: reading text file as an array by using streamreader Pin
Richard MacCutchan28-Aug-19 21:27
protectorRichard MacCutchan28-Aug-19 21:27 
QuestionRe: reading text file as an array by using streamreader Pin
Maciej Los28-Aug-19 21:42
protectorMaciej Los28-Aug-19 21:42 
AnswerRe: reading text file as an array by using streamreader Pin
Maciej Los28-Aug-19 22:32
protectorMaciej Los28-Aug-19 22:32 
AnswerRe: reading text file as an array by using streamreader Pin
BillWoodruff28-Aug-19 23:04
mveBillWoodruff28-Aug-19 23:04 
AnswerRe: reading text file as an array by using streamreader Pin
Gene M10-Sep-19 14:48
memberGene M10-Sep-19 14:48 
AnswerRe: reading text file as an array by using streamreader Pin
Jacek Gajek12-Sep-19 9:35
memberJacek Gajek12-Sep-19 9:35 
QuestionTool to add code in my existing class Pin
Bastien Vandamme28-Aug-19 5:48
memberBastien Vandamme28-Aug-19 5:48 
AnswerRe: Tool to add code in my existing class Pin
Richard MacCutchan28-Aug-19 5:54
protectorRichard MacCutchan28-Aug-19 5:54 
AnswerRe: Tool to add code in my existing class Pin
Richard Deeming28-Aug-19 7:47
mveRichard Deeming28-Aug-19 7:47 
AnswerRe: Tool to add code in my existing class Pin
BillWoodruff28-Aug-19 18:35
mveBillWoodruff28-Aug-19 18:35 

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.