Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
QuestionConvert From VB.Net to C # Project Pin
misCafe12-May-09 17:07
misCafe12-May-09 17:07 
AnswerRe: Convert From VB.Net to C # Project Pin
Dave Kreskowiak12-May-09 17:22
mveDave Kreskowiak12-May-09 17:22 
GeneralRe: Convert From VB.Net to C # Project Pin
misCafe12-May-09 17:35
misCafe12-May-09 17:35 
QuestionUsing richtextbox as output Pin
Quake2Player12-May-09 16:53
Quake2Player12-May-09 16:53 
AnswerRe: Using richtextbox as output Pin
Dave Kreskowiak12-May-09 17:21
mveDave Kreskowiak12-May-09 17:21 
Questioninheriting varibles from within a class Pin
antrock10112-May-09 16:03
antrock10112-May-09 16:03 
AnswerRe: inheriting varibles from within a class Pin
Luc Pattyn12-May-09 16:45
sitebuilderLuc Pattyn12-May-09 16:45 
GeneralRe: inheriting varibles from within a class Pin
antrock10112-May-09 16:55
antrock10112-May-09 16:55 
GeneralRe: inheriting varibles from within a class Pin
Luc Pattyn12-May-09 17:15
sitebuilderLuc Pattyn12-May-09 17:15 
GeneralRe: inheriting varibles from within a class Pin
antrock10112-May-09 17:17
antrock10112-May-09 17:17 
AnswerRe: inheriting varibles from within a class Pin
PIEBALDconsult12-May-09 17:20
mvePIEBALDconsult12-May-09 17:20 
GeneralRe: inheriting varibles from within a class Pin
Luc Pattyn12-May-09 17:22
sitebuilderLuc Pattyn12-May-09 17:22 
GeneralRe: inheriting varibles from within a class Pin
PIEBALDconsult12-May-09 17:41
mvePIEBALDconsult12-May-09 17:41 
GeneralRe: inheriting varibles from within a class Pin
antrock10112-May-09 17:25
antrock10112-May-09 17:25 
GeneralRe: inheriting varibles from within a class Pin
antrock10112-May-09 17:36
antrock10112-May-09 17:36 
GeneralRe: inheriting varibles from within a class Pin
PIEBALDconsult12-May-09 17:46
mvePIEBALDconsult12-May-09 17:46 
GeneralRe: inheriting varibles from within a class Pin
antrock10112-May-09 18:00
antrock10112-May-09 18:00 
GeneralUsing the New keyword Pin
Mycroft Holmes12-May-09 15:23
professionalMycroft Holmes12-May-09 15:23 
GeneralRe: Using the New keyword Pin
Luc Pattyn12-May-09 17:09
sitebuilderLuc Pattyn12-May-09 17:09 
GeneralRe: Using the New keyword Pin
Mycroft Holmes12-May-09 19:06
professionalMycroft Holmes12-May-09 19:06 
GeneralRe: Using the New keyword Pin
PIEBALDconsult12-May-09 17:34
mvePIEBALDconsult12-May-09 17:34 
It sounds like you're trying to override a method in a base class which doesn't allow polymorphic inheritence; which is all too common in .net and you're right to think twice.

In my opinion, non-polymorphic inheritence (via new) should be avoided. Unfortunately, the only alternative is likely to be wrapping the class and then having to implement all the public methods and properties of the wrapped class, which is a total pain the [wrist].

If you proceed with non-poly-whosis be aware that a user of your class may be able to bypass your implementation and access the base class' implementation; you will need to be sure that this will not leave the instance in an invalid state.


Mycroft Holmes wrote:
I am a great believer in elegant and correct code


If only Microsoft was; then methods would be virtual by default.
GeneralRe: Using the New keyword Pin
N a v a n e e t h12-May-09 18:15
N a v a n e e t h12-May-09 18:15 
GeneralRe: Using the New keyword Pin
PIEBALDconsult13-May-09 3:21
mvePIEBALDconsult13-May-09 3:21 
GeneralRe: Using the New keyword Pin
Mycroft Holmes12-May-09 19:09
professionalMycroft Holmes12-May-09 19:09 
GeneralRe: Using the New keyword Pin
Luc Pattyn12-May-09 23:58
sitebuilderLuc Pattyn12-May-09 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.