Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Wednesday, April 20, 2011

Get Value from Variable inside Variable.



public class Utils
{
  public static object MyEvaluate(string eval, object source)
  {
    return source.GetType().GetField(eval,
      BindingFlags.IgnoreCase | BindingFlags.NonPublic | 
      BindingFlags.Instance | BindingFlags.Public)
      .GetValue(source);
  }
}
Then you'll have to call it like this instead:
private int A;

// initialize it in the declarations or elsewhere
this.A = 10;
string B = "A";
var C = Utils.MyEvaluate(B, this);

Monday, October 18, 2010

VFP Form to VB, C# .Net Convesion

The form converter converts the Microsoft Visual Foxpro(VFP) forms into .Net forms to use with converted VFP to .Net projects with a click of a button!
  • Sizes forms to original sizes.Sizes buttons to original size.Original captions used for forms, buttons, labels, etc.Original source code is commented out and placed in named subroutines that match button, combo boxes, text boxes, etc.
  • Converts Foxpro forms to VB.Net
  • Converts Foxpro forms to C#.Net