Click here to Skip to main content
16,005,222 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Polymorphism and types Pin
Heath Stewart29-Mar-04 8:18
protectorHeath Stewart29-Mar-04 8:18 
That's one way of doing it, but don't just assume that obj is a Big. Do some type checking first, and throw an ArgumentException if the type is wrong. You could make it as simple as:
public override in Create(object obj)
{
  Bid bid = obj as Big;
  if (bid == null) throw new ArgumentException("Must pass a Bid object.",
    "obj");
  // Continue with bid...
}
If you want to provide typed parameters, overload Create and just have each of them call one of the Create methods that takes all parameters into account and actually contains the definition of the method.

If you don't want developers to see the overridden method, you can attribute the method with the EditorBrowsableAttribute, passing EditorBrowsableState.Never in the constructor. This doesn't mean it can't be executed, just that compliant code editors (like VS.NET) won't show it in IntelliSense.

 

Microsoft MVP, Visual C#
My Articles
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 
GeneralRe: Custom Install Pin
Heath Stewart31-Mar-04 3:23
protectorHeath Stewart31-Mar-04 3:23 

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.