c# - Get property name inside setter -


I want to preserve an asset between postback in an asp.net application. Currently doing this:

  public ININxX return to session [toString (+) + "My index"]; }}  

but would like something like this:

  public int MyMendex {get {return (int) session [toString () + # code_that_returns_property_name #]; }}  

The setter has been omitted, but it pushes the value in the session using the same string. Is there a way to use reflection, or a different better solution?

  public static id dummy {get {var propertyName = MethodBase.GetCurrentMethod (). Name Substring (4); Console.WriteLine (property); Return 0; }}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -