473,396 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

overriding method or property in partial class

I'm working with a code generator that uses partial classes to
generated the basic stuff and leave the other file alone for you to
make changes.

In the 1.1 version we would inherit from a class and then override a
property or method for customization. How would I do this with a
partial class. override doesn't compile. is there another modifier I
can use?

Jan 26 '06 #1
1 9396
john_teague <jc******@gmail.com> wrote:
I'm working with a code generator that uses partial classes to
generated the basic stuff and leave the other file alone for you to
make changes.

In the 1.1 version we would inherit from a class and then override a
property or method for customization. How would I do this with a
partial class. override doesn't compile. is there another modifier I
can use?


No - you can't do this with partial classes. It's something I believe
the C# team are considering for a future release.

Of course, you can still derive from the class and override the method
there.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jan 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lelekács Zoltán | last post by:
Hi, I would like to use a thread together with an object. In the constructor of the object I create the thread and I would like to dispose in the Dispose method of the object, but it is already...
7
by: fisab | last post by:
I apologise in advance for such a basic question, but I'm hoping someone will take the time to answer my question. In my code I define a Dataset : Partial Class Default_aspx Dim dsExcel As...
16
by: pawel.pabich | last post by:
Hajo, I would like to have 2 my own partial classes. For example: Default.aspx.cs Default2.aspx.cs and they both will relate to Default.aspx page.
1
by: William H. Burling | last post by:
i have a nest of vb.vanilla collections. CollectionofHotelData.item("great Pequot").item("2000").item(22) The above works. I wrote the code that constructs the nested collections and i can...
3
by: bradw2k | last post by:
In 2.0, can a partial class inherit from a partial class to override a virtual method? I do not have VS2005 installed to test, I'm just trying to plan with respect to upgrading to 2.0 later. If...
4
by: Sami Rehman | last post by:
Hi I want to use namespaces to organize all the classes, web forms, and user controls. It works fine with my user defined classes, but when I try to put all the web pages in a namespace for...
1
by: hardieca | last post by:
Hi! I decorate my unfinished classes and methods with a custom TODO attribute (as in things To Do). Using reflection, I am then able to parse through my classes and output all TODOs to a list I...
6
FishVal
by: FishVal | last post by:
Hi, everybody. The thread title is actually the whole question. :) Does anybody know how to declare default method/property in Class module if it is possible at all? Any ideas/hints/links will...
5
by: SAL | last post by:
Hello, I would like to be able to set the WHERE clause of a select statement on the fly. I have a DataAccess layer designed using the DataSet designer and a BusinessLogic layer using classes. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.