Click here to Skip to main content
15,889,909 members
Home / Discussions / C#
   

C#

 
GeneralRe: Very basic beginners confusion over public properties Pin
Daley8330-Jun-10 6:08
Daley8330-Jun-10 6:08 
GeneralRe: Very basic beginners confusion over public properties Pin
Ravi Bhavnani30-Jun-10 6:10
professionalRavi Bhavnani30-Jun-10 6:10 
AnswerRe: Very basic beginners confusion over public properties Pin
harold aptroot30-Jun-10 6:05
harold aptroot30-Jun-10 6:05 
GeneralRe: Very basic beginners confusion over public properties Pin
Daley8330-Jun-10 6:10
Daley8330-Jun-10 6:10 
GeneralRe: Very basic beginners confusion over public properties Pin
harold aptroot30-Jun-10 6:11
harold aptroot30-Jun-10 6:11 
AnswerRe: Very basic beginners confusion over public properties Pin
Keith Barrow30-Jun-10 6:11
professionalKeith Barrow30-Jun-10 6:11 
GeneralRe: Very basic beginners confusion over public properties Pin
Daley8330-Jun-10 6:20
Daley8330-Jun-10 6:20 
AnswerRe: Very basic beginners confusion over public properties Pin
Ennis Ray Lynch, Jr.30-Jun-10 6:12
Ennis Ray Lynch, Jr.30-Jun-10 6:12 
I think the other answers have addressed the answer to your question. However, based on my experience, I think I can guess your goal for this particular thought exercise and that is that each fruit would return it's correct name. For this you can delve into some more complicated OO concepts that will give you the result.

public abstract class Fruit{
    protected abstract string GetFruitName();
    public string Name{
        get{
            return GetFruitName();
        }
    }
}
public class Apple : Fruit{
    protected override string GetFruitName(){
        return "Apple";
    }
}


Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.

A man said to the universe:
"Sir I exist!"
"However," replied the universe,
"The fact has not created in me
A sense of obligation."
--Stephen Crane


GeneralRe: Very basic beginners confusion over public properties Pin
harold aptroot30-Jun-10 6:14
harold aptroot30-Jun-10 6:14 
GeneralRe: Very basic beginners confusion over public properties Pin
Daley8330-Jun-10 6:17
Daley8330-Jun-10 6:17 
GeneralRe: Very basic beginners confusion over public properties Pin
Ennis Ray Lynch, Jr.30-Jun-10 6:28
Ennis Ray Lynch, Jr.30-Jun-10 6:28 
QuestionHow to show tooltip on the button Pin
undynamicmagic30-Jun-10 4:52
undynamicmagic30-Jun-10 4:52 
AnswerRe: How to show tooltip on the button Pin
Peace ON30-Jun-10 4:58
Peace ON30-Jun-10 4:58 
GeneralRe: How to show tooltip on the button Pin
undynamicmagic30-Jun-10 5:52
undynamicmagic30-Jun-10 5:52 
QuestionUsing a Chart Control in Vs 2010 [modified] Pin
It_tech30-Jun-10 4:33
It_tech30-Jun-10 4:33 
QuestionCorrect marshalling? C# callback from C++ DLL Pin
ProfAndyZulu30-Jun-10 3:14
ProfAndyZulu30-Jun-10 3:14 
AnswerRe: Correct marshalling? C# callback from C++ DLL Pin
David Knechtges30-Jun-10 5:07
David Knechtges30-Jun-10 5:07 
Questionstd::map<> in C# Pin
raju_shiva30-Jun-10 1:50
raju_shiva30-Jun-10 1:50 
AnswerRe: std::map in C# Pin
Łukasz Nowakowski30-Jun-10 1:56
Łukasz Nowakowski30-Jun-10 1:56 
AnswerRe: std::map in C# Pin
Pete O'Hanlon30-Jun-10 3:00
mvePete O'Hanlon30-Jun-10 3:00 
AnswerRe: std::map in C# Pin
Laxman Auti30-Jun-10 5:25
Laxman Auti30-Jun-10 5:25 
GeneralRe: std::map in C# Pin
raju_shiva30-Jun-10 20:21
raju_shiva30-Jun-10 20:21 
GeneralRe: std::map in C# Pin
Laxman Auti30-Jun-10 22:46
Laxman Auti30-Jun-10 22:46 
GeneralRe: std::map in C# Pin
raju_shiva30-Jun-10 23:18
raju_shiva30-Jun-10 23:18 
GeneralRe: std::map in C# Pin
Laxman Auti1-Jul-10 1:06
Laxman Auti1-Jul-10 1:06 

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.