This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
ParamNames.TESTVALUE.Dump(); | |
ParamNames.TEST.Dump(); | |
ParamNames p1 = ((ParamNames)ParamNames.TESTVALUE).Dump(); | |
//Not possible: | |
//ParamNames p2 = (ParamNames.TESTVALUE as ParamNames); | |
bool t3 = (p1 == ParamNames.TEST).Dump(); | |
bool t4 = (p1 == (ParamNames)ParamNames.TESTVALUE).Dump(); | |
bool t5 = (p1 == ParamNames.TESTVALUE).Dump(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
string pre = SOURCE.Substring(0, SOURCE.LastIndexOf(DELIMITER)); | |
string post = SOURCE.Substring(SOURCE.LastIndexOf(DELIMITER) + 1); | |
Console.Write(pre + SOURCE.Replace("\"", "\"\"") + post); | |
} | |
// Define other methods and classes here | |
const char DELIMITER = '$'; | |
const string SOURCE = @"void Main() |
NewerOlder