|
Sponsored Links
Resources
.NET Research Library
Get .NET related white papers, case studies and webcasts
|
.NET architecture
.NET architecture
.NET architecture
|
Messages: 4
Messages: 4
Messages: 4
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Partial classes
I got an enhancement request from a user on Dingo's forum asking for Partial class support. Although implementing it isn't that hard, I question the value of Partial classes. So I have to ask others, "Is this feature really useful?" I found several articles and blogs discussion partial classes. One article on C# corner http://www.c-sharpcorner.com/Code/2004/July/WhidbeyFeatures.asp suggests Partial classes is good because it allows multiple developers to work on the same class. I find that idea scary and ripe for abuse. I then came across a blog by Dan Fernandez http://blogs.msdn.com/danielfe/archive/2004/02/02/66463.aspx suggesting it is a way to separate VS.NET generated code and user implemented code. although that reason seems valid to me, I think it would be better for VS.NET to generate an abstract class and label the necessary methods virtual. This way, users would extend that base class and implement the required methods.
What do others think?
peter
|
|
Message #172619
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
I totally agree
Partial classes seem like a hack, made just to address the Visual Studio.NET issue.
I think that your suggestion of abstract classes would a lot better.
|
|
Message #172630
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
anyone know why partial was added to .NET 2.0?
I'm curious as to why MS decided to provide Partial class in .NET 2.0? Was it to address the needs of VB developers? Is it some how related to the new modeling features in VS.NET? If there is a compelling reason, I'd like to know.
Even though it's tempting to dismiss the feature, I'd like to know the real reason and make sure I'm not just being totally bias.
peter
|
|
Message #172719
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
I disagree...
It may seem that partial classes is a hack to support the new features in VS.NET 2005. At the same time I think that the purpose it serves in VS.NET is nice. Separate the designer code from the programmers code which is good. Especially in advanced projects.
Outside VS.NET I look forward to this feature as well. We use a codegenerator to generate all dataaccess classes and all classes that make up the state-objects. Today we have to inherit from the generated assembly to add additional methods. (And generate a new assembly) With .Net 2.0 we will be able to write the additional methods which will be compiled into the single output assembly. This will result in a much smooth build process.
Regards, Anders
|
|
 |
Top posters of the weekTop posters of the weekTop posters of the week |
 |
 |
This list contains the members who have made the most posts in all forums over the
last 7 days:
- Karissa Sin
- sherazam khan
- Mike Liu
- Core Lab
|
Hot threads
Hot threads
Hot threads
|
More hot threads
More hot threads
More hot threads
|
 |
Speaking at EclipseCon 2006, Java developer and independent consultant Madhu Siddalingaiah compared Microsoft's Visual Studio IDE to the open source development environment of Eclipse.
(33 comments,
last posted
March 09, 2010)
In this tech talk, Microsoft's Peter Provost talks about the design of the Composite UI Application Block and how the p&p team has led Microsoft in the adoption of Agile methodologies.
(0 comments,
last posted
April 17, 2006)
Chapter 4 of Framework Design Guidelines, titled "Type Design Guidelines," presents patterns that describe when and how to design classes, constructs and interfaces. In this chapter, Abrams and Cwalina divide types into four groups and discuss the do's and don'ts of type design.
(2 comments,
last posted
July 07, 2006)
Paul Ferrill caught up with prime open-source .NET applications driver Miguel De Icaza at Novell's BrainShare conference last week. They discussed the status of Windows Forms for Mono (it's coming along) and VB.NET for Mono (it looks like it's out).
(5 comments,
last posted
March 30, 2006)
In this tech talk, Microsoft Visual Studio architect Jack Greenfield discusses the company's approach to Domain-Specific Languages, or DSLs, and the part they play in software factories.
(0 comments,
last posted
March 15, 2006)
More hot threads »
|
|