<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/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>Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx</link><description>Over the years I have heard that some folk actually use partial classes to help assist in-team collaboration efforts, yet I have yet to meet such people. If you have a standard source control system that allows you to merge then surely this is just as</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1644669</link><pubDate>Thu, 14 Aug 2008 16:45:08 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1644669</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;It&amp;#39;s because M$ Visual Source Safe doesn&amp;#39;t have good support for merging patches. &amp;nbsp;It&amp;#39;s designed for checkout to block all other attempts to checkout.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1644669" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1643125</link><pubDate>Sat, 02 Aug 2008 18:00:21 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1643125</guid><dc:creator>Bill</dc:creator><description>&lt;p&gt;I&amp;#39;ve seen partial classes used to separate out static methods sometimes for organization purposes (as it is a better option than regions). One example of this is the Rhino.Commons.Util.With class:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/rhino-commons/Rhino.Commons/With/"&gt;rhino-tools.svn.sourceforge.net/.../With&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1643125" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642716</link><pubDate>Wed, 30 Jul 2008 15:44:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642716</guid><dc:creator>Speednet</dc:creator><description>&lt;p&gt;I actually found a nice use for partial classes.&lt;/p&gt;
&lt;p&gt;On some of my larger objects, I use partial classes to separate static methods from instance methods.&lt;/p&gt;
&lt;p&gt;I like doing that a lot better than using Regions, which I really can&amp;#39;t stand.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried it, but I imagine that for very large classes, separate files could be created for properties, constructor, methods, statics, etc.&lt;/p&gt;
&lt;p&gt;Bottom line is that I love having the option. &amp;nbsp;Partial classes were a nice idea.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642716" width="1" height="1"&gt;</description></item><item><title>Dew Drop - July 30, 2008 | Alvin Ashcraft's Morning Dew</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642694</link><pubDate>Wed, 30 Jul 2008 12:07:42 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642694</guid><dc:creator>Dew Drop - July 30, 2008 | Alvin Ashcraft's Morning Dew</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Dew Drop - July 30, 2008 | Alvin Ashcraft&amp;#39;s Morning Dew&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642694" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642681</link><pubDate>Wed, 30 Jul 2008 08:22:36 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642681</guid><dc:creator>Muhammad Qasim Pasta</dc:creator><description>&lt;p&gt;According to our Coding standards document ... a class/file should not be more than 1500 lines.... so we use partial classes in order to manage our codes; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642681" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642598</link><pubDate>Tue, 29 Jul 2008 21:27:03 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642598</guid><dc:creator>Granville Barnett</dc:creator><description>&lt;p&gt;@Guy - that actually sounds like a pretty clean solution to that sort of thing, I may have to *borrow* that idea sometime in the future.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642598" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642596</link><pubDate>Tue, 29 Jul 2008 21:07:14 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642596</guid><dc:creator>Guy Harwood</dc:creator><description>&lt;p&gt;I have found partial classes very useful of late. While refactoring some classes I find it a lot easier to put deprecated code in a separate physical file, which allows me to navigate and focus on the good stuff a lot more easily.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642596" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642582</link><pubDate>Tue, 29 Jul 2008 19:09:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642582</guid><dc:creator>Granville Barnett</dc:creator><description>&lt;p&gt;@Scott - good point, I had not thought of that. Would if have not been better to derive from that class though you wanted to extend? assuming it was not sealed of course.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still pretty unconvinced that people do use partial classes inline with that 1st point on MSDN. Seems to be pretty much designer exclusive.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642582" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642576</link><pubDate>Tue, 29 Jul 2008 18:06:56 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642576</guid><dc:creator>Scott Hoggarth</dc:creator><description>&lt;p&gt;Recently I was working with an open source framework. &amp;nbsp;There was a class that didn&amp;#39;t have a method I wanted, so I added it using partial classes. &amp;nbsp;This might be what MSDN had in mind, working with code that you don&amp;#39;t own.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642576" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642573</link><pubDate>Tue, 29 Jul 2008 17:59:17 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642573</guid><dc:creator>Rick Ratayczak</dc:creator><description>&lt;p&gt;I use partial classes when I use xsdgen to generate classes from xml files, I add methods to a partial class for it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642573" width="1" height="1"&gt;</description></item><item><title>re: Partial classes - they have only one real use, right?</title><link>http://msmvps.com/blogs/gbarnett/archive/2008/07/29/partial-classes-they-have-only-one-real-use-right.aspx#1642561</link><pubDate>Tue, 29 Jul 2008 16:44:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642561</guid><dc:creator>Rob Chartier</dc:creator><description>&lt;p&gt;One of the larger places I used partial classes is for extending proxy&amp;#39;s generated via wsdl.exe for Web Service&amp;#39;s. &amp;nbsp;Much of the time you need to extend the set of properties/methods on these proxy&amp;#39;s.&lt;/p&gt;
&lt;p&gt;A simple example, is that the old way which wsdl.exe worked is that it would only emit fields, not properties. &amp;nbsp;And you can only databind to properties. &amp;nbsp;So in this case we used to have to extend the partial class with the list of fields needed for binding...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642561" width="1" height="1"&gt;</description></item></channel></rss>