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

C#

 
GeneralRe: CsvHelper, converting $0.00 to 0.00 Pin
jkirkerx3-Sep-20 13:20
professionaljkirkerx3-Sep-20 13:20 
AnswerGot It Pin
jkirkerx4-Sep-20 6:34
professionaljkirkerx4-Sep-20 6:34 
GeneralRe: Got It Pin
Mycroft Holmes4-Sep-20 12:15
professionalMycroft Holmes4-Sep-20 12:15 
GeneralRe: Got It Pin
jkirkerx4-Sep-20 13:54
professionaljkirkerx4-Sep-20 13:54 
AnswerI have 3 or 5 of them now, yes they need more work Pin
jkirkerx4-Sep-20 14:08
professionaljkirkerx4-Sep-20 14:08 
GeneralRe: I have 3 or 5 of them now, yes they need more work Pin
Gerry Schmitz5-Sep-20 3:58
mveGerry Schmitz5-Sep-20 3:58 
GeneralRe: I have 3 or 5 of them now, yes they need more work Pin
jkirkerx5-Sep-20 7:24
professionaljkirkerx5-Sep-20 7:24 
QuestionCsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
jkirkerx2-Sep-20 13:55
professionaljkirkerx2-Sep-20 13:55 
AnswerRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
OriginalGriff2-Sep-20 22:42
mveOriginalGriff2-Sep-20 22:42 
GeneralRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
jkirkerx3-Sep-20 6:11
professionaljkirkerx3-Sep-20 6:11 
GeneralRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
Dave Kreskowiak3-Sep-20 8:51
mveDave Kreskowiak3-Sep-20 8:51 
AnswerRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas PinPopular
Richard Deeming2-Sep-20 22:50
mveRichard Deeming2-Sep-20 22:50 
GeneralRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
jkirkerx3-Sep-20 6:13
professionaljkirkerx3-Sep-20 6:13 
AnswerRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
Luc Pattyn3-Sep-20 1:36
sitebuilderLuc Pattyn3-Sep-20 1:36 
GeneralRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
jkirkerx3-Sep-20 6:12
professionaljkirkerx3-Sep-20 6:12 
AnswerRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
jkirkerx3-Sep-20 6:31
professionaljkirkerx3-Sep-20 6:31 
AnswerRe: CsvHelper, EBay Order Csv file, not sure how to handle header with quotes and first line of commas Pin
Gerry Schmitz3-Sep-20 10:23
mveGerry Schmitz3-Sep-20 10:23 
QuestionConnect POST server call with HttpListener C# Pin
jdamiancabello2-Sep-20 0:21
jdamiancabello2-Sep-20 0:21 
AnswerRe: Connect POST server call with HttpListener C# Pin
Afzaal Ahmad Zeeshan3-Sep-20 5:19
professionalAfzaal Ahmad Zeeshan3-Sep-20 5:19 
QuestionInheritance problem Pin
Croccodillo19711-Sep-20 5:22
Croccodillo19711-Sep-20 5:22 
AnswerRe: Inheritance problem Pin
Richard Deeming1-Sep-20 7:26
mveRichard Deeming1-Sep-20 7:26 
Members declared with new will not be visible to the base class. When code in the base class looks for the Data member, it will use its own member, not the "shadowed" member declared by the derived class.

Members which are meant to be overridden in a derived class must be marked as virtual, and overridden properly in the derived class.

Knowing When to Use Override and New Keywords - C# Programming Guide | Microsoft Docs[^]

However, a nested class cannot be marked as "virtual". Instead, you will need to inherit from it. You will also need to use a constructor to overwrite the default field values.
C#
public class BaseClass
{
    public class Data
    {
        public int data1 = 1;
        public int data2 = 1;
        public string data3 = "BaseString";
    }
    
    public Data Value { get; }
    
    public BaseClass()
    {
        Value = new Data();
    }
}

public class DerivedClass : BaseClass
{
    public class DerivedData : BaseClass.Data
    {
        public int data4 = 2;
        
        public DerivedData()
        {
            data1 = 2;
            data2 = 2;
            data3 = "DerivedString";
        }
    }
    
    public DerivedClass()
    {
        Value = new DerivedData();
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Inheritance problem Pin
Croccodillo19711-Sep-20 21:58
Croccodillo19711-Sep-20 21:58 
AnswerRe: Inheritance problem Pin
BillWoodruff9-Sep-20 21:16
professionalBillWoodruff9-Sep-20 21:16 
QuestionHow to reliably exit Outlook using Interop.Outlook? Pin
Server Automator30-Aug-20 14:43
professionalServer Automator30-Aug-20 14:43 
AnswerRe: How to reliably exit Outlook using Interop.Outlook? Pin
Gerry Schmitz31-Aug-20 4:50
mveGerry Schmitz31-Aug-20 4:50 

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.