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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -