<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for C# Extension Properties? (Coffeehouse on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/coffeehouse/257556-c-extension-properties/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for C# Extension Properties? (Coffeehouse on Channel 9)</title><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/</link></image><description>C# Extension Properties?</description><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/</link><language>en-us</language><pubDate>Wed, 07 Oct 2009 08:44:28 GMT</pubDate><lastBuildDate>Wed, 07 Oct 2009 08:44:28 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3599.6114, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Re: C# Extension Properties?</title><description>&lt;p&gt;Or you could use VB.NET, where you don't need parentesis after methods ;)&lt;/p&gt;
&lt;p&gt;Me to would like extension properties in .net c#; more lika an&amp;nbsp;Aspect oriented aproach&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=496632</link><pubDate>Wed, 07 Oct 2009 08:44:27 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=496632</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/496632/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Or you could use VB.NET, where you don't need parentesis after methods ;)
Me to would like extension properties in .net c#; more lika an&amp;nbsp;Aspect oriented aproach</evnet:previewtext><dc:creator>Jonwib</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/496632/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: C# Extension Properties?</title><description>&lt;p&gt;I haven't used it much, but it's a visual designer, right? &amp;nbsp;There's more to WPF than visual design. &amp;nbsp;I'm thinking of setting up dependency properties, etc.&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=494109</link><pubDate>Thu, 24 Sep 2009 17:34:14 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=494109</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/494109/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I haven't used it much, but it's a visual designer, right? &amp;nbsp;There's more to WPF than visual design. &amp;nbsp;I'm thinking of setting up dependency properties, etc.</evnet:previewtext><dc:creator>contextfree</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/494109/Trackback.aspx</trackback:ping></item><item><title>Re: Re: C# Extension Properties?</title><description>&lt;p&gt;Blend doesnt suit your needs?&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=494044</link><pubDate>Thu, 24 Sep 2009 08:02:41 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=494044</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/494044/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Blend doesnt suit your needs?</evnet:previewtext><dc:creator>Maddus Mattus</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/494044/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>&lt;p&gt;Coding WPF classes in C# sometimes feels like coding COM classes in C++: you have to explicitly provide plumbing that obscures the high-level abstractions. &amp;nbsp;XAML is nicer, but it's both limited in capability and saddled with clunky XML syntax. &amp;nbsp;This is my biggest problem with WPF, an API that in the abstract is very nice, I just wish there were a better view into it ... like JavaFX Script. &amp;nbsp; :P &lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=493891</link><pubDate>Wed, 23 Sep 2009 17:33:57 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=493891</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/493891/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Coding WPF classes in C# sometimes feels like coding COM classes in C++: you have to explicitly provide plumbing that obscures the high-level abstractions. &amp;nbsp;XAML is nicer, but it's both limited in capability and saddled with clunky XML syntax. &amp;nbsp;This is my biggest problem with WPF, an API&amp;#8230;</evnet:previewtext><dc:creator>contextfree</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/493891/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: C# Extension Properties?</title><description>&lt;p&gt;True, but you can't use that in something like databinding (in WPF or Silverlight at least). Sometimes you just need a property.&lt;/p&gt;
&lt;p&gt;Having extension properties would be extremely powerful in a scenario where you use something like LinqToSql in a service, use partial classes there to make properties available in the DataContract and then use some extension properties to format some properties for databinding.&lt;/p&gt;
&lt;p&gt;I know I could do the latter with a valueconverter but I find that more troublesome then it needs to be.&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=493766</link><pubDate>Wed, 23 Sep 2009 07:44:32 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=493766</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/493766/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>True, but you can't use that in something like databinding (in WPF or Silverlight at least). Sometimes you just need a property.
Having extension properties would be extremely powerful in a scenario where you use something like LinqToSql in a service, use partial classes there to make properties&amp;#8230;</evnet:previewtext><dc:creator>Jonathan van de Veen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/493766/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: C# Extension Properties?</title><description>&lt;p&gt;Still, using a pair of empty ellipses, you can still achieve the same effect, i.e. (for gets, not for sets)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[code language="csharp"]20.Minutes().Ago()[/code]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I &lt;a href="http://www.scala-lang.org/node/118"&gt;believe &lt;/a&gt;in Scala you can use any method using infix notation so you might be able to express something like&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[code language="scala"]20 minutes ago[/code]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I'm experimenting with using extension methods to achieve null-safe "object-oriented" expressions&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[code language="csharp"]int? v = element.Value().Eval&amp;lt;int&amp;gt;();[/code]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Value(), as an extension method over XElement, and Eval as an extension method over object, are both null-safe. If element is null, then the whole expression evaluates to null; if element.Value() is null, then the whole expression evaluates to null; if element.Value().Eval&amp;lt;int&amp;gt;() is not possible (format error or unsupported conversion), then the whole expression evaluates to null.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This property, that one can model null-safety with extension methods is absolutely adorable.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the C# field/method/property system is a bit non-uniform now, but it's still very useable and powerful.&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486651</link><pubDate>Mon, 24 Aug 2009 22:04:19 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486651</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/486651/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Still, using a pair of empty ellipses, you can still achieve the same effect, i.e. (for gets, not for sets)
&amp;nbsp;
[code language="csharp"]20.Minutes().Ago()[/code]
&amp;nbsp;
I believe in Scala you can use any method using infix notation so you might be able to express something like
&amp;nbsp;
[code&amp;#8230;</evnet:previewtext><dc:creator>Bent Rasmussen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/486651/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: C# Extension Properties?</title><description>&lt;p&gt;You cannot subclass a sealed class or a struct&amp;nbsp;to implement the decorator pattern.&lt;/p&gt;
&lt;p&gt;EDIT:&amp;nbsp;Oops, thread necromancy.&amp;nbsp; grr, frindly1000!&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486639</link><pubDate>Mon, 24 Aug 2009 21:15:25 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486639</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/486639/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>You cannot subclass a sealed class or a struct&amp;nbsp;to implement the decorator pattern.
EDIT:&amp;nbsp;Oops, thread necromancy.&amp;nbsp; grr, frindly1000!</evnet:previewtext><dc:creator>Joe Chung</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/486639/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: C# Extension Properties?</title><description>&lt;p&gt;In regards to extension methods being confusing, I agree in that extension methods are extraordinarily powerful and thus have dramatic potential for misuse.&amp;nbsp; However there are a few cases such as adding context specific methods to base objects like object or string or adding methods to a system interface like IList where they are the best way to perform the move.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That being said it is sad that extension properties, which seem to me to be no more or less powerful or appropriate than extension methods were not included simply because an agreement on the declaration syntax could not be reached.&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486631</link><pubDate>Mon, 24 Aug 2009 20:47:23 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=486631</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/486631/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>In regards to extension methods being confusing, I agree in that extension methods are extraordinarily powerful and thus have dramatic potential for misuse.&amp;nbsp; However there are a few cases such as adding context specific methods to base objects like object or string or adding methods to a system&amp;#8230;</evnet:previewtext><dc:creator>Jake</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/486631/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: C# Extension Properties?</title><description>Well, without the extension method language feature, you'd have to use the &lt;A href="http://en.wikipedia.org/wiki/Decorator_pattern"&gt;decorator pattern&lt;/A&gt;. If you only want to add a single method, that's potentially an awful lot of work, which is why I like extensions.&lt;BR&gt;&lt;BR&gt;For me the real strength of extension methods is in adding type-inferenced extension methods to interface, so that classes inheriting that interface automatically get interface-related functionality for free (we discussed this a while ago over on &lt;A href="http://channel9.msdn.com/forums/TechOff/426863-Interface--Extension-Methods-any-improvement-on-abstract-classes/"&gt;this thread&lt;/A&gt;).&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Herbie&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455682</link><pubDate>Fri, 30 Jan 2009 18:46:32 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455682</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/455682/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Well, without the extension method language feature, you'd have to use the decorator pattern. If you only want to add a single method, that's potentially an awful lot of work, which is why I like extensions.For me the real strength of extension methods is in adding type-inferenced extension methods&amp;#8230;</evnet:previewtext><dc:creator>Herbie Smith</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/455682/Trackback.aspx</trackback:ping></item><item><title>Re: Re: C# Extension Properties?</title><description>&amp;gt; &amp;nbsp;If you want to add a method to a class, then subclass it.&lt;BR&gt;&lt;BR&gt;What if the class you want to add a method to is sealed or worse, is a struct, preventing you from doing just that? Not unlike DateTime, TimeSpan or String?</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455680</link><pubDate>Fri, 30 Jan 2009 18:14:53 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455680</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/455680/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&amp;gt; &amp;nbsp;If you want to add a method to a class, then subclass it.What if the class you want to add a method to is sealed or worse, is a struct, preventing you from doing just that? Not unlike DateTime, TimeSpan or String?</evnet:previewtext><dc:creator>dahat</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/455680/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>I'm probably in the minority here, but I think the whole extension methods concept is confusing.&amp;nbsp; If you want to add a method to a class, then subclass it.&amp;nbsp; That's why inheritance exists, and it makes a lot more sense to me when I see MyTimeSpan.Ago rather than TimeSpan.Ago, because I might go searching the MSDN for documentation on TimeSpan.Ago only to find it doesn't exist.</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455676</link><pubDate>Fri, 30 Jan 2009 17:55:54 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455676</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/455676/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I'm probably in the minority here, but I think the whole extension methods concept is confusing.&amp;nbsp; If you want to add a method to a class, then subclass it.&amp;nbsp; That's why inheritance exists, and it makes a lot more sense to me when I see MyTimeSpan.Ago rather than TimeSpan.Ago, because I&amp;#8230;</evnet:previewtext><dc:creator>Scott</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/455676/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>&lt;P&gt;I was wondering about this feature as well. Could the syntax look something like this:&lt;BR&gt;&lt;BR&gt;public static class Extensions {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static object Cell{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get(this DataTable t, int row, int column)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ return t.Rows[row][column]; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set(this DataTable t, int row, int column)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ t.Rows[row][column] = value; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;// usage&lt;BR&gt;dataTable.Cell[0, 2] = "Hello World";&lt;BR&gt;&lt;BR&gt;The usage would be the same, but the compiler would just have to translate this new syntax and it differs from indexing syntax.&lt;/P&gt;
&lt;P&gt;public static TimeSpan Minutes&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get(this int i)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;return new TimeSpan(0, i, 0); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;public static DateTime Ago&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get(this TimeSpan ts)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ return DateTime.Now.Subtract(ts); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;They still look like properties.&lt;BR&gt;&lt;BR&gt;Andres&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455672</link><pubDate>Fri, 30 Jan 2009 16:56:12 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=455672</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/455672/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I was wondering about this feature as well. Could the syntax look something like this:public static class Extensions {&amp;nbsp;&amp;nbsp;&amp;nbsp; public static object Cell{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get(this DataTable t, int row, int&amp;#8230;</evnet:previewtext><dc:creator>Andres Olivares</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/455672/Trackback.aspx</trackback:ping></item><item><title>Re: Re: C# Extension Properties?</title><description>Hah.&amp;nbsp; Reminds me of a query I saw recently.&amp;nbsp; At my new job, we communicate alot with an ancient DB2 system; someone posted a query like:&lt;BR&gt;&lt;BR&gt;Select * from abc.defg&lt;BR&gt;where dt = ? - 180 days&lt;BR&gt;&lt;BR&gt;I was like, what? Awesome.&lt;BR&gt;&lt;BR&gt;Then someone showed me that TOP 10 is now FETCH FIRST 10 ROWS ONLY.&amp;nbsp; And the awe was gone.&lt;BR&gt;&lt;BR&gt;Don't get me started.</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423468</link><pubDate>Wed, 27 Aug 2008 00:28:30 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423468</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423468/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Hah.&amp;nbsp; Reminds me of a query I saw recently.&amp;nbsp; At my new job, we communicate alot with an ancient DB2 system; someone posted a query like:Select * from abc.defgwhere dt = ? - 180 daysI was like, what? Awesome.Then someone showed me that TOP 10 is now FETCH FIRST 10 ROWS ONLY.&amp;nbsp; And the&amp;#8230;</evnet:previewtext><dc:creator>SlackmasterK</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423468/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: C# Extension Properties?</title><description>yep, that's what I wanted to say...&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423202</link><pubDate>Mon, 25 Aug 2008 10:59:59 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423202</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423202/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>yep, that's what I wanted to say...</evnet:previewtext><dc:creator>Ion Todirel</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423202/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: C# Extension Properties?</title><description>The way I read it, the reason extension properties didn't make it in was because they couldn't reach consensus about a good syntax for declaring them.</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423201</link><pubDate>Mon, 25 Aug 2008 10:48:51 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423201</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423201/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The way I read it, the reason extension properties didn't make it in was because they couldn't reach consensus about a good syntax for declaring them.</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423201/Trackback.aspx</trackback:ping></item><item><title>Re: Re: C# Extension Properties?</title><description>I meant the extension property declaration will be confusing and very close in definition to a indexer&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423200</link><pubDate>Mon, 25 Aug 2008 10:41:30 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423200</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423200/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I meant the extension property declaration will be confusing and very close in definition to a indexer</evnet:previewtext><dc:creator>Ion Todirel</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423200/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: C# Extension Properties?</title><description>Actually, as he wrote it the "Ago" property would show up on TimeSpan, not on DateTime, which makes a lot more sense. So you wouldn't actually be able to do DateTime.Now.Ago.</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423169</link><pubDate>Mon, 25 Aug 2008 03:00:57 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423169</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423169/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Actually, as he wrote it the "Ago" property would show up on TimeSpan, not on DateTime, which makes a lot more sense. So you wouldn't actually be able to do DateTime.Now.Ago.</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423169/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: C# Extension Properties?</title><description>&lt;P&gt;Holy cow... I wanted to reply but this thread is over a year old... and now I did it :(&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423168</link><pubDate>Mon, 25 Aug 2008 02:54:51 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423168</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423168/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Holy cow... I wanted to reply but this thread is over a year old... and now I did it :(</evnet:previewtext><dc:creator>Christian Liensberger</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423168/Trackback.aspx</trackback:ping></item><item><title>Re: Re: C# Extension Properties?</title><description>It's not.&amp;nbsp; However, there are side effects.&amp;nbsp; Having the ability to write DateTime.Now.Ago is definitely confusing.&amp;nbsp; The Ago property would show up on all DateTimes (provided the using statement is there).&amp;nbsp; The idea is good, though.&amp;nbsp; Having an int extension property named MinutesAgo seems better.&lt;BR&gt;&lt;BR&gt;I too would have liked to see extension properties.&amp;nbsp; We have custom properties that we read from the DB and are generating them onto classes.&amp;nbsp; We are forced to use the ugly GetPropertyname() syntax.</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423167</link><pubDate>Mon, 25 Aug 2008 02:44:39 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=423167</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/423167/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>It's not.&amp;nbsp; However, there are side effects.&amp;nbsp; Having the ability to write DateTime.Now.Ago is definitely confusing.&amp;nbsp; The Ago property would show up on all DateTimes (provided the using statement is there).&amp;nbsp; The idea is good, though.&amp;nbsp; Having an int extension property named&amp;#8230;</evnet:previewtext><dc:creator>GaryC</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/423167/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;TommyCarlier wrote:&lt;/div&gt;&lt;div&gt;How is 20.Minutes.Ago more confusing than DateTime.Now.Subtract(new TimeSpan(0, 20, 0))?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;&lt;br&gt;lol. :) thanks for that.&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352894</link><pubDate>Thu, 13 Sep 2007 09:56:06 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352894</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352894/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>TommyCarlier wrote:How is 20.Minutes.Ago more confusing than DateTime.Now.Subtract(new TimeSpan(0, 20, 0))?lol. :) thanks for that.</evnet:previewtext><dc:creator>dcuccia</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352894/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>How is 20.Minutes.Ago more confusing than DateTime.Now.Subtract(new TimeSpan(0, 20, 0))?</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352865</link><pubDate>Thu, 13 Sep 2007 05:30:19 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352865</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352865/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>How is 20.Minutes.Ago more confusing than DateTime.Now.Subtract(new TimeSpan(0, 20, 0))?</evnet:previewtext><dc:creator>Tommy Carlier</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352865/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;mabster wrote:&lt;/div&gt;&lt;div&gt;﻿Yeah, I was hoping for extension properties too:&lt;BR&gt;&lt;BR&gt;public static TimeSpan Minutes[this int i]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;public static DateTime Ago[this TimeSpan ts]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;So then I could do:&lt;BR&gt;&lt;BR&gt;DateTime d = 20.Minutes.Ago;&lt;BR&gt;&lt;BR&gt;No ugly parentheses!&lt;/div&gt;&lt;/BLOCKQUOTE&gt;yeah but its confusing and is too close&amp;nbsp;to an&amp;nbsp;an indexer</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352812</link><pubDate>Wed, 12 Sep 2007 22:36:39 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352812</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352812/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>mabster wrote:﻿Yeah, I was hoping for extension properties too:public static TimeSpan Minutes[this int i]{&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }}public static DateTime Ago[this TimeSpan ts]{&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }}So then I could do:DateTime d =&amp;#8230;</evnet:previewtext><dc:creator>Ion Todirel</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352812/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;mabster wrote:&lt;/div&gt;&lt;div&gt;﻿Yeah, I was hoping for extension properties too:&lt;BR&gt;&lt;BR&gt;public static TimeSpan Minutes[this int i]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;public static DateTime Ago[this TimeSpan ts]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;So then I could do:&lt;BR&gt;&lt;BR&gt;DateTime d = 20.Minutes.Ago;&lt;BR&gt;&lt;BR&gt;No ugly parentheses!&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;&lt;BR&gt;Sweet. That looks Ruby'ish (not to be mistaken by Rubish). Not that I like Ruby. :)</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352723</link><pubDate>Wed, 12 Sep 2007 16:23:46 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352723</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352723/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>mabster wrote:﻿Yeah, I was hoping for extension properties too:public static TimeSpan Minutes[this int i]{&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }}public static DateTime Ago[this TimeSpan ts]{&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }}So then I could do:DateTime d =&amp;#8230;</evnet:previewtext><dc:creator>Bent Rasmussen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352723/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>Exactly. It would be great to have these to get/set WPF attached properties. For Example, instead of writing this:&lt;br&gt;&lt;br&gt;DockPanel.SetDock(btn1, Dock.Left);&lt;br&gt;DockPanel.SetDock(btn2, Dock.Left);&lt;br&gt;DockPanel.SetDock(btn3, Dock.Left);&lt;br&gt;&lt;br&gt;You would write this instead:&lt;br&gt;&lt;br&gt;btn1.Dock = btn2.Dock = btn3.Dock = Dock.Left;&lt;br&gt;&lt;br&gt;Much cooler [H]&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352707</link><pubDate>Wed, 12 Sep 2007 15:20:46 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352707</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352707/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Exactly. It would be great to have these to get/set WPF attached properties. For Example, instead of writing this:DockPanel.SetDock(btn1, Dock.Left);DockPanel.SetDock(btn2, Dock.Left);DockPanel.SetDock(btn3, Dock.Left);You would write this instead:btn1.Dock = btn2.Dock = btn3.Dock = Dock.Left;Much cooler [H]</evnet:previewtext><dc:creator>ktr</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352707/Trackback.aspx</trackback:ping></item><item><title>Re: C# Extension Properties?</title><description>Yeah, I was hoping for extension properties too:&lt;BR&gt;&lt;BR&gt;public static TimeSpan Minutes[this int i]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;public static DateTime Ago[this TimeSpan ts]&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;So then I could do:&lt;BR&gt;&lt;BR&gt;DateTime d = 20.Minutes.Ago;&lt;BR&gt;&lt;BR&gt;No ugly parentheses!</description><comments></comments><link>http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352605</link><pubDate>Wed, 12 Sep 2007 05:14:52 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/257556-C-Extension-Properties/?CommentID=352605</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/352605/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Yeah, I was hoping for extension properties too:public static TimeSpan Minutes[this int i]{&amp;nbsp;&amp;nbsp; get {&amp;nbsp;return new TimeSpan(0, i, 0); }}public static DateTime Ago[this TimeSpan ts]{&amp;nbsp;&amp;nbsp; get { return DateTime.Now.Subtract(ts); }}So then I could do:DateTime d = 20.Minutes.Ago;No ugly parentheses!</evnet:previewtext><dc:creator>Matt Hamilton</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/352605/Trackback.aspx</trackback:ping></item></channel></rss>