Click here to Skip to main content
15,925,528 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pointers Pin
Heath Stewart30-Mar-04 3:37
protectorHeath Stewart30-Mar-04 3:37 
GeneralRe: Pointers Pin
Roger H Art30-Mar-04 6:22
sussRoger H Art30-Mar-04 6:22 
GeneralRe: Pointers Pin
Heath Stewart30-Mar-04 8:27
protectorHeath Stewart30-Mar-04 8:27 
GeneralNeed Help with Writing a IO.Stream Pin
David Flores29-Mar-04 8:32
David Flores29-Mar-04 8:32 
GeneralRe: Need Help with Writing a IO.Stream Pin
Heath Stewart29-Mar-04 8:40
protectorHeath Stewart29-Mar-04 8:40 
GeneralAccess files in use Pin
Shaun Becker29-Mar-04 7:33
Shaun Becker29-Mar-04 7:33 
GeneralRe: Access files in use Pin
Heath Stewart29-Mar-04 8:23
protectorHeath Stewart29-Mar-04 8:23 
GeneralPolymorphism and types Pin
esuyer4saic29-Mar-04 7:30
esuyer4saic29-Mar-04 7:30 
Hi folks,

I'm a .net newbie and an wondering if something like this is possible in C# and .net:

I have an abstract class:

abstract public class AbstractDAO {
abstract public int Create(object obj);
...
}

And a concrete class that extends it:

public class BidDAO : AbstractDAO {
public override int Create(Bid bid) { ... };
...
}

this generates a build error because Create(Bid bid) does not effectively override Create(object obj).

The problem goes away if I change the concrete class to:

public class BidDAO : AbstractDAO {
public override int Create(object obj) { Bid bid; bid = (Bid) obj; ... };
...
}

Is there anyway around this? Or perhaps a better question is, is this the *correct* way of doing this?


Any help is much appreciated!

Ed.
GeneralRe: Polymorphism and types Pin
Heath Stewart29-Mar-04 8:18
protectorHeath Stewart29-Mar-04 8:18 
GeneralReporting Pin
rags29-Mar-04 6:35
rags29-Mar-04 6:35 
GeneralRe: Reporting Pin
Heath Stewart29-Mar-04 8:09
protectorHeath Stewart29-Mar-04 8:09 
GeneralRe: Reporting Pin
Michael Flanakin29-Mar-04 17:25
Michael Flanakin29-Mar-04 17:25 
GeneralCustom Install Pin
dotnetdev@univ.kiev.ua29-Mar-04 6:05
dotnetdev@univ.kiev.ua29-Mar-04 6:05 
GeneralRe: Custom Install Pin
Heath Stewart29-Mar-04 8:07
protectorHeath Stewart29-Mar-04 8:07 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua29-Mar-04 22:10
dotnetdev@univ.kiev.ua29-Mar-04 22:10 
GeneralRe: Custom Install Pin
Heath Stewart30-Mar-04 3:28
protectorHeath Stewart30-Mar-04 3:28 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua30-Mar-04 4:18
dotnetdev@univ.kiev.ua30-Mar-04 4:18 
GeneralRe: Custom Install Pin
Heath Stewart30-Mar-04 4:24
protectorHeath Stewart30-Mar-04 4:24 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua30-Mar-04 19:54
dotnetdev@univ.kiev.ua30-Mar-04 19:54 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua30-Mar-04 20:42
dotnetdev@univ.kiev.ua30-Mar-04 20:42 
GeneralRe: Custom Install Pin
Heath Stewart31-Mar-04 3:14
protectorHeath Stewart31-Mar-04 3:14 
GeneralRe: Custom Install Pin
Heath Stewart31-Mar-04 3:08
protectorHeath Stewart31-Mar-04 3:08 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua31-Mar-04 3:15
dotnetdev@univ.kiev.ua31-Mar-04 3:15 
GeneralRe: Custom Install Pin
Heath Stewart31-Mar-04 3:16
protectorHeath Stewart31-Mar-04 3:16 
GeneralRe: Custom Install Pin
dotnetdev@univ.kiev.ua31-Mar-04 3:20
dotnetdev@univ.kiev.ua31-Mar-04 3:20 

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.