Click here to Skip to main content
15,889,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: Just for the fun of it... Pin
harold aptroot13-Sep-14 0:28
harold aptroot13-Sep-14 0:28 
GeneralRe: Just for the fun of it... Pin
Rob Philpott13-Sep-14 1:02
Rob Philpott13-Sep-14 1:02 
QuestionMail sending in c# Pin
vidhyankr11-Sep-14 19:51
professionalvidhyankr11-Sep-14 19:51 
SuggestionRe: Mail sending in c# Pin
Richard MacCutchan11-Sep-14 21:34
mveRichard MacCutchan11-Sep-14 21:34 
AnswerRe: Mail sending in c# Pin
challa naresh kumar reddy12-Sep-14 1:50
challa naresh kumar reddy12-Sep-14 1:50 
QuestionAny suggestions for "compiling" strings? Pin
SledgeHammer0111-Sep-14 14:32
SledgeHammer0111-Sep-14 14:32 
AnswerRe: Any suggestions for "compiling" strings? Pin
PIEBALDconsult11-Sep-14 15:36
mvePIEBALDconsult11-Sep-14 15:36 
GeneralRe: Any suggestions for "compiling" strings? Pin
SledgeHammer0111-Sep-14 16:02
SledgeHammer0111-Sep-14 16:02 
In it's simplest form of explanation, I'm just trying to expand "complex" macros in a string.

For example, say the caller calls me with "My dogs' name is $[User:Dog]". I need to return "My dogs' name is Spot".

I can have simple macros like $[DateTime] or more "complex" macros like $[User:Fullname=true].

I'm already caching the Regex object to save on the Regex engine having to parse the expression every time.

My other idea besides the $A1 / $B2 thing was to maybe on the first parse to build a string for a C# method like:

static void DummyFunc(User user)
{
return String.Format("My dogs' name is {0} and today is {1}.", user.DogName, DateTime.Now);
}


and compile it into a temp assembly. Or to do something similar using expression trees. My first thought went to the generating C# code at runtime and compiling it because doing something like this with expression trees is a big ol' PITA since I would need to call a bunch of functions to expand all the macros available.
GeneralRe: Any suggestions for "compiling" strings? Pin
SledgeHammer0111-Sep-14 19:37
SledgeHammer0111-Sep-14 19:37 
AnswerRe: Any suggestions for "compiling" strings? Pin
Pete O'Hanlon11-Sep-14 22:38
mvePete O'Hanlon11-Sep-14 22:38 
AnswerRe: Any suggestions for "compiling" strings? Pin
jschell13-Sep-14 6:57
jschell13-Sep-14 6:57 
QuestionDatagridcombocell Problem Pin
hussainroyal11-Sep-14 10:39
hussainroyal11-Sep-14 10:39 
SuggestionRe: Datagridcombocell Problem Pin
Richard MacCutchan11-Sep-14 21:32
mveRichard MacCutchan11-Sep-14 21:32 
GeneralRe: Datagridcombocell Problem Pin
hussainroyal11-Sep-14 22:03
hussainroyal11-Sep-14 22:03 
QuestionGet a property from an internal .NET framework class Pin
Mc_Topaz11-Sep-14 4:20
Mc_Topaz11-Sep-14 4:20 
AnswerRe: Get a property from an internal .NET framework class Pin
Richard Deeming11-Sep-14 4:38
mveRichard Deeming11-Sep-14 4:38 
GeneralRe: Get a property from an internal .NET framework class Pin
Mc_Topaz11-Sep-14 4:46
Mc_Topaz11-Sep-14 4:46 
AnswerRe: Get a property from an internal .NET framework class Pin
Dave Kreskowiak11-Sep-14 4:45
mveDave Kreskowiak11-Sep-14 4:45 
AnswerRe: Get a property from an internal .NET framework class Pin
Eddy Vluggen11-Sep-14 5:20
professionalEddy Vluggen11-Sep-14 5:20 
GeneralRe: Get a property from an internal .NET framework class Pin
OriginalGriff11-Sep-14 5:29
mveOriginalGriff11-Sep-14 5:29 
GeneralRe: Get a property from an internal .NET framework class Pin
PIEBALDconsult11-Sep-14 6:19
mvePIEBALDconsult11-Sep-14 6:19 
GeneralRe: Get a property from an internal .NET framework class Pin
Eddy Vluggen11-Sep-14 6:51
professionalEddy Vluggen11-Sep-14 6:51 
GeneralRe: Get a property from an internal .NET framework class Pin
OriginalGriff11-Sep-14 8:50
mveOriginalGriff11-Sep-14 8:50 
GeneralRe: Get a property from an internal .NET framework class Pin
Eddy Vluggen11-Sep-14 9:39
professionalEddy Vluggen11-Sep-14 9:39 
QuestionTX TextControl 21.0 Document viewer example in c# Pin
pitchaiyan11-Sep-14 3:44
pitchaiyan11-Sep-14 3:44 

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.