<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C#</title><link>http://forums.asp.net/37.aspx</link><description>Discussions/Questions about the C# language. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=13&amp;c=23" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Using System.Reflection in C# on an object to set a property value</title><link>http://forums.asp.net/thread/3273414.aspx</link><pubDate>Fri, 03 Jul 2009 11:38:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273414</guid><dc:creator>FoolongC</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273414.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=3273414</wfw:commentRss><description>&lt;p&gt;This is what I&amp;#39;m looking for and will work. Thank you!&lt;/p&gt;</description></item><item><title>Re: Using System.Reflection in C# on an object to set a property value</title><link>http://forums.asp.net/thread/3270189.aspx</link><pubDate>Thu, 02 Jul 2009 03:18:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270189</guid><dc:creator>RickNZ</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270189.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=3270189</wfw:commentRss><description>&lt;p&gt;Your code will look something like this:&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;PropertyInfo pinfo = typeof(YourClass).GetProperty(key);
MethodInfo setInfo = pinfo.GetSetMethod(true);
if (setInfo != null)
    setInfo.Invoke(null, param);&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Using System.Reflection in C# on an object to set a property value</title><link>http://forums.asp.net/thread/3270119.aspx</link><pubDate>Thu, 02 Jul 2009 02:20:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270119</guid><dc:creator>FoolongC</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270119.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=3270119</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;Can anyone post an example of reflecting on an object and if I find a property in that object then setting that property&amp;#39;s value and then returning the object.&lt;/p&gt;&lt;p&gt;I want to create a method that takes an object and a string that represents the property I want to set.&lt;/p&gt;&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>