Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: User control Name Pin
OriginalGriff1-Jul-10 2:11
mveOriginalGriff1-Jul-10 2:11 
GeneralRe: User control Name Pin
freakyit1-Jul-10 2:05
freakyit1-Jul-10 2:05 
AnswerRe: User control Name Pin
freakyit1-Jul-10 2:27
freakyit1-Jul-10 2:27 
GeneralRe: User control Name Pin
chrisclarke111-Jul-10 7:40
chrisclarke111-Jul-10 7:40 
GeneralRe: User control Name Pin
freakyit2-Jul-10 3:04
freakyit2-Jul-10 3:04 
Questionvirtual/abstract methods and properties Pin
Daley8330-Jun-10 23:27
Daley8330-Jun-10 23:27 
AnswerRe: virtual/abstract methods and properties Pin
Peace ON30-Jun-10 23:51
Peace ON30-Jun-10 23:51 
GeneralRe: virtual/abstract methods and properties Pin
Daley831-Jul-10 0:00
Daley831-Jul-10 0:00 
Hi Jinal, to an extent yes this is what I'm attempting to do.
However within the wikipedia articles c# example there is this block of code;
public static IPizza CreatePizza(PizzaType pizzaType)
    {
        switch (pizzaType)
        {
            case PizzaType.HamMushroom:
                return new HamAndMushroomPizza();
            case PizzaType.Deluxe:
                return new DeluxePizza();
            case PizzaType.Hawaiian:
                return new HawaiianPizza();
            default:
                throw new ArgumentException("The pizza type " + pizzaType + " is not recognized.");
        }
    }


So I still have the problem of a long winded repetitive case statement or if statement.

From what i have read if a base fruit method or property is marked virtual, and you call said method or property on some unknown fruit, C# will see which kind of fruit you really have a hold of and call ITS designated overridden version. Thus avoiding ifs and case statements but how do I get to that point?
AnswerRe: virtual/abstract methods and properties Pin
Peace ON1-Jul-10 0:20
Peace ON1-Jul-10 0:20 
AnswerRe: virtual/abstract methods and properties Pin
Łukasz Nowakowski1-Jul-10 0:22
Łukasz Nowakowski1-Jul-10 0:22 
GeneralRe: virtual/abstract methods and properties Pin
Daley831-Jul-10 1:04
Daley831-Jul-10 1:04 
AnswerUPDATE: virtual/abstract methods and properties Pin
Daley831-Jul-10 1:02
Daley831-Jul-10 1:02 
GeneralRe: UPDATE: virtual/abstract methods and properties Pin
Łukasz Nowakowski1-Jul-10 1:29
Łukasz Nowakowski1-Jul-10 1:29 
GeneralRe: UPDATE: virtual/abstract methods and properties Pin
Daley831-Jul-10 1:45
Daley831-Jul-10 1:45 
GeneralRe: UPDATE: virtual/abstract methods and properties Pin
Łukasz Nowakowski1-Jul-10 1:54
Łukasz Nowakowski1-Jul-10 1:54 
GeneralRe: UPDATE: virtual/abstract methods and properties Pin
harold aptroot1-Jul-10 3:47
harold aptroot1-Jul-10 3:47 
AnswerRe: virtual/abstract methods and properties Pin
Ennis Ray Lynch, Jr.1-Jul-10 3:44
Ennis Ray Lynch, Jr.1-Jul-10 3:44 
QuestionHow to join 2 string[] objects Pin
Chesnokov Yuriy30-Jun-10 23:00
professionalChesnokov Yuriy30-Jun-10 23:00 
AnswerRe: How to join 2 string[] objects Pin
R. Giskard Reventlov30-Jun-10 23:03
R. Giskard Reventlov30-Jun-10 23:03 
AnswerRe: How to join 2 string[] objects Pin
freakyit30-Jun-10 23:19
freakyit30-Jun-10 23:19 
AnswerRe: How to join 2 string[] objects Pin
Ayman Kouzayha30-Jun-10 23:31
Ayman Kouzayha30-Jun-10 23:31 
AnswerRe: How to join 2 string[] objects Pin
Laxman Auti1-Jul-10 0:19
Laxman Auti1-Jul-10 0:19 
GeneralRe: How to join 2 string[] objects Pin
Chesnokov Yuriy1-Jul-10 0:41
professionalChesnokov Yuriy1-Jul-10 0:41 
AnswerRe: How to join 2 string[] objects Pin
Ravi Bhavnani2-Jul-10 4:58
professionalRavi Bhavnani2-Jul-10 4:58 
QuestionConvert 32-bit Bitmap file to 24-bit Pin
Ayman Kouzayha30-Jun-10 22:28
Ayman Kouzayha30-Jun-10 22:28 

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.