<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/Reflection</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 04:43:27 GMT</pubDate>
<item>
<title>(Java) Inheritance example - bcmoney</title>
<link>http://snipplr.com/view/66775/inheritance-example/</link>
<description><![CDATA[ <p>This example demonstrates advanced object-oriented concepts including inheritance, getters/setters, method overloading and reflection.</p> ]]></description>
<pubDate>Fri, 17 Aug 2012 05:03:19 GMT</pubDate>
<guid>http://snipplr.com/view/66775/inheritance-example/</guid>
</item>
<item>
<title>(PHP) Get a list of class constants - ryantxr</title>
<link>http://snipplr.com/view/66060/get-a-list-of-class-constants/</link>
<description><![CDATA[ <p>Gets the constants from a class using reflection.</p> ]]></description>
<pubDate>Wed, 11 Jul 2012 04:41:32 GMT</pubDate>
<guid>http://snipplr.com/view/66060/get-a-list-of-class-constants/</guid>
</item>
<item>
<title>(Ruby) List an object's methods - arpit</title>
<link>http://snipplr.com/view/59670/list-an-objects-methods/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 12 Oct 2011 16:06:34 GMT</pubDate>
<guid>http://snipplr.com/view/59670/list-an-objects-methods/</guid>
</item>
<item>
<title>(Java) Creating a reflection effect in Android - arpit</title>
<link>http://snipplr.com/view/55170/creating-a-reflection-effect-in-android/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 12 Jun 2011 03:28:16 GMT</pubDate>
<guid>http://snipplr.com/view/55170/creating-a-reflection-effect-in-android/</guid>
</item>
<item>
<title>(C#) Get Calling Method using Reflection - wallybh</title>
<link>http://snipplr.com/view/50743/get-calling-method-using-reflection/</link>
<description><![CDATA[ <p>Get the  calling method using reflection.</p> ]]></description>
<pubDate>Thu, 17 Mar 2011 02:08:06 GMT</pubDate>
<guid>http://snipplr.com/view/50743/get-calling-method-using-reflection/</guid>
</item>
<item>
<title>(C#) Get enum values by Reflection - ronklein</title>
<link>http://snipplr.com/view/48028/get-enum-values-by-reflection/</link>
<description><![CDATA[ <p>This code keeps the code order. For instance:

public enum Color
{
    Red = 100,
    Green = 0,
    Blue = 5        
}


-Will generate the names as Red, Green, Blue.
Using the Enum.GetNames approach won't make it.</p> ]]></description>
<pubDate>Fri, 28 Jan 2011 02:50:31 GMT</pubDate>
<guid>http://snipplr.com/view/48028/get-enum-values-by-reflection/</guid>
</item>
<item>
<title>(ActionScript 3) Class reflection throught getDefinitionByName - activetofocus</title>
<link>http://snipplr.com/view/47660/class-reflection-throught-getdefinitionbyname/</link>
<description><![CDATA[ <p>Useful.</p> ]]></description>
<pubDate>Fri, 21 Jan 2011 19:50:46 GMT</pubDate>
<guid>http://snipplr.com/view/47660/class-reflection-throught-getdefinitionbyname/</guid>
</item>
<item>
<title>(ActionScript 3) auto register object aliases for remoting - away4m</title>
<link>http://snipplr.com/view/44487/auto-register-object-aliases-for-remoting/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 20 Nov 2010 08:46:25 GMT</pubDate>
<guid>http://snipplr.com/view/44487/auto-register-object-aliases-for-remoting/</guid>
</item>
<item>
<title>(JavaScript) Object Reflections - iancrowther</title>
<link>http://snipplr.com/view/44309/object-reflections/</link>
<description><![CDATA[ <p>this is my way of working out the contents of an object when I don't have access to a debugger like firebug</p> ]]></description>
<pubDate>Wed, 17 Nov 2010 22:43:20 GMT</pubDate>
<guid>http://snipplr.com/view/44309/object-reflections/</guid>
</item>
<item>
<title>(Java) Get value from object using getter via reflection - peceps</title>
<link>http://snipplr.com/view/42309/get-value-from-object-using-getter-via-reflection/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 15 Oct 2010 02:37:32 GMT</pubDate>
<guid>http://snipplr.com/view/42309/get-value-from-object-using-getter-via-reflection/</guid>
</item>
<item>
<title>(CSS) CSS Reflection (Webkit) - tcdesign</title>
<link>http://snipplr.com/view/41723/css-reflection-webkit/</link>
<description><![CDATA[ <p>Only works for webkit</p> ]]></description>
<pubDate>Thu, 07 Oct 2010 07:59:55 GMT</pubDate>
<guid>http://snipplr.com/view/41723/css-reflection-webkit/</guid>
</item>
<item>
<title>(C#) Reflection convert all propperties - darkbaron1912</title>
<link>http://snipplr.com/view/37884/reflection-convert-all-propperties/</link>
<description><![CDATA[ <p>openpacs</p> ]]></description>
<pubDate>Sun, 25 Jul 2010 17:03:57 GMT</pubDate>
<guid>http://snipplr.com/view/37884/reflection-convert-all-propperties/</guid>
</item>
<item>
<title>(Visual Basic) Reflection extension method to copy properties from one object to another object. - s0lidmetal</title>
<link>http://snipplr.com/view/36094/reflection-extension-method-to-copy-properties-from-one-object-to-another-object/</link>
<description><![CDATA[ <p>This copies all property values from Class A to Class B. Useful if you have many unrelated classes that share similar properties and you are constantly writing code like:

    shirt.Color = pants.Color
    shirt.Pattern = pants.Pattern
    shirt.Style = pants.Style

Could change to:

    pants.CopyPropertiesTo(shirt)</p> ]]></description>
<pubDate>Thu, 24 Jun 2010 05:12:30 GMT</pubDate>
<guid>http://snipplr.com/view/36094/reflection-extension-method-to-copy-properties-from-one-object-to-another-object/</guid>
</item>
<item>
<title>(Visual Basic) Reflection extension method to bind DataRow values to object properties. - s0lidmetal</title>
<link>http://snipplr.com/view/36093/reflection-extension-method-to-bind-datarow-values-to-object-properties/</link>
<description><![CDATA[ <p>This will populate object properties with values from a DataRow. The DataTable column names must match the property names and types of the target class.

Example:

    DataTable dt = new DataTable();
    dt.Columns.Add("TestString", typeof(string));
    dt.Columns.Add("TestBool", typeof(bool));
    dt.Columns.Add("TestInt", typeof(int));
    dt.Columns.Add("TestDouble", typeof(double));
    dt.Columns.Add("TestDecimal", typeof(decimal));
    dt.Columns.Add("TestFloat", typeof(string));

    DataRow dr = dt.NewRow();
    dr["TestString"] = "Hello";
    dr["TestBool"] = false;
    dr["TestInt"] = DBNull.Value;
    dr["TestDouble"] =4.56;
    dr["TestDecimal"] = 7.89m;
    dr["TestFloat"] = "3.14f";
    dt.Rows.Add(dr);

    TestClass tc = new TestClass();
    dr.AssignObjectValue(tc);
            
    class TestClass
    {
        public string TestString { get; set; }
        public bool? TestBool { get; set; }
        public int? TestInt { get; set; }
        public double TestDouble { get; set; }
        public decimal TestDecimal { get; set; }
        public float TestFloat { get; set; }
    }</p> ]]></description>
<pubDate>Thu, 24 Jun 2010 05:04:11 GMT</pubDate>
<guid>http://snipplr.com/view/36093/reflection-extension-method-to-bind-datarow-values-to-object-properties/</guid>
</item>
<item>
<title>(C#) Constructing Generics Through Reflection (List of Mixed Types Example) - bryanlyman</title>
<link>http://snipplr.com/view/33857/constructing-generics-through-reflection-list-of-mixed-types-example/</link>
<description><![CDATA[ <p>.net 2.0+ Generic classes make code size much smaller and casting objects (boxing) a cinch. However, currently there are some unsupported IDE options when trying to cast objects to and from generic objects that use mixed object types (inherited from a generic type specifier). Fear not, using reflection we can bypass the IDE and supply the users with strongly typed objects.</p> ]]></description>
<pubDate>Tue, 04 May 2010 16:58:15 GMT</pubDate>
<guid>http://snipplr.com/view/33857/constructing-generics-through-reflection-list-of-mixed-types-example/</guid>
</item>
<item>
<title>(CSS) Gradient 2.0 text - stayce</title>
<link>http://snipplr.com/view/31114/gradient-20-text/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 08 Apr 2010 12:15:36 GMT</pubDate>
<guid>http://snipplr.com/view/31114/gradient-20-text/</guid>
</item>
<item>
<title>(C#) Converting MethodInfo into a delegate instance to improve performance - pckujawa</title>
<link>http://snipplr.com/view/29683/converting-methodinfo-into-a-delegate-instance-to-improve-performance/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 12 Mar 2010 10:13:43 GMT</pubDate>
<guid>http://snipplr.com/view/29683/converting-methodinfo-into-a-delegate-instance-to-improve-performance/</guid>
</item>
<item>
<title>(C#) GetProperties() - rtipton</title>
<link>http://snipplr.com/view/29029/getproperties/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 28 Feb 2010 17:48:50 GMT</pubDate>
<guid>http://snipplr.com/view/29029/getproperties/</guid>
</item>
<item>
<title>(ActionScript 3) Reflection Class for MovieClips - sidneydekoning</title>
<link>http://snipplr.com/view/26805/reflection-class-for-movieclips/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 21 Jan 2010 06:16:01 GMT</pubDate>
<guid>http://snipplr.com/view/26805/reflection-class-for-movieclips/</guid>
</item>
<item>
<title>(C#) Get the Namespace, Class Name, and Method Name of the Currently Executing Method Via Reflection - rengber</title>
<link>http://snipplr.com/view/26471/get-the-namespace-class-name-and-method-name-of-the-currently-executing-method-via-reflection/</link>
<description><![CDATA[ <p>GetFrame(1) to avoid the last method being this property accessor.  
Note that in a child class inherited member, the Class name will be the name of the type containing the implementation.</p> ]]></description>
<pubDate>Thu, 14 Jan 2010 15:09:24 GMT</pubDate>
<guid>http://snipplr.com/view/26471/get-the-namespace-class-name-and-method-name-of-the-currently-executing-method-via-reflection/</guid>
</item>
</channel>
</rss>