.net eval() equivalent

2 posts, 0 answers
  1. Lorne Green
    Lorne Green avatar
    47 posts
    Member since:
    Mar 2005

    Posted 12 Feb 2006 Link to this post

    Say you have two strings.

    String 1: "FormatDateTime((0}, DateFormat.ShortDate)"
    String 2: "3/17/2005 1:40:00 AM"

    Is it possible to apply the format within string 1 to string 2? For what it's worth, the value will not always contain a date, it should be able to handle anything.

    I know that the existing EVAL() function would do what I'm looking for, but I need a .NET 2.0 equivalent. TIA!
  2. Rumen
    Rumen avatar
    1536 posts

    Posted 13 Feb 2006 Link to this post

    Hi Lorne,

    To the best of my knowledge there is no built-in Eval support in C# / VB.NET. There is eval support in JScript.NET and some elaborate hacks would be needed to port that to C# / VB.NET. Here is a online article that describes that in detail:


    the telerik team
Back to Top