Click here to Skip to main content
15,918,193 members
Home / Discussions / C#
   

C#

 
Questionhow to show a range of date using calender control in c# .net Pin
aurosikhadas10-Oct-08 1:01
aurosikhadas10-Oct-08 1:01 
AnswerRe: how to show a range of date using calender control in c# .net Pin
leppie10-Oct-08 2:30
leppie10-Oct-08 2:30 
QuestionInsert Images along with images name to PDF C# Pin
ramyanaidu10-Oct-08 0:43
ramyanaidu10-Oct-08 0:43 
AnswerRe: Insert Images along with images name to PDF C# Pin
leppie10-Oct-08 2:30
leppie10-Oct-08 2:30 
GeneralDesign a Class Pin
Rohit16db10-Oct-08 0:43
Rohit16db10-Oct-08 0:43 
GeneralRe: Design a Class Pin
DaveyM6910-Oct-08 1:29
professionalDaveyM6910-Oct-08 1:29 
GeneralRe: Design a Class Pin
Rohit16db10-Oct-08 1:45
Rohit16db10-Oct-08 1:45 
GeneralRe: Design a Class [modified] Pin
#realJSOP10-Oct-08 1:37
professional#realJSOP10-Oct-08 1:37 
If I understand what you want (and I probably don't), what you want to do is called oveloading.

public class A
{
    private List<a> list = new List<a>();
    public List<a> GetAllRecords() { get { return list; } }
}
public class B
{
    private List<b> list = new List<b>();
    public List<b> GetAllRecords() { get { return list; } }
}
public class C
{
    private List<c> list = new List<c>();
    public List<c> GetAllRecords() { get { return list; } }
}

public class D
{
    private A a = new A();
    private B b = new B();
    private C c = new C();

    private List<a> aList;
    private List<b> bList;
    private List<c> cList;

    public D()
    {
    }

    private List<a> GetAllRecords(A a)
    {
        aList = a.GetAllRecords;
    }

    private List<b> GetAllRecords(B b)
    {
        bList = b.GetAllRecords;
    }

    private List<c> GetAllRecords(C c)
    {
        cList = c.GetAllRecords;
    }
}


[EDIT] Forgot to convert the pointy brackets...


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


modified on Saturday, October 11, 2008 5:08 AM

QuestionHow to save icons Pin
Ankit Rajpoot10-Oct-08 0:15
Ankit Rajpoot10-Oct-08 0:15 
AnswerRe: How to save icons Pin
JoeSharp10-Oct-08 1:52
JoeSharp10-Oct-08 1:52 
QuestionValue type vs reference type Pin
Mogaambo10-Oct-08 0:05
Mogaambo10-Oct-08 0:05 
AnswerRe: Value type vs reference type Pin
rah_sin10-Oct-08 0:17
professionalrah_sin10-Oct-08 0:17 
AnswerRe: Value type vs reference type Pin
DaveyM6910-Oct-08 0:17
professionalDaveyM6910-Oct-08 0:17 
GeneralRe: Value type vs reference type Pin
Mogaambo10-Oct-08 0:26
Mogaambo10-Oct-08 0:26 
GeneralRe: Value type vs reference type Pin
DaveyM6910-Oct-08 1:21
professionalDaveyM6910-Oct-08 1:21 
GeneralRe: Value type vs reference type Pin
DaveyM6910-Oct-08 2:20
professionalDaveyM6910-Oct-08 2:20 
GeneralRe: Value type vs reference type Pin
Mogaambo10-Oct-08 2:23
Mogaambo10-Oct-08 2:23 
GeneralRe: Value type vs reference type Pin
DaveyM6910-Oct-08 2:39
professionalDaveyM6910-Oct-08 2:39 
Generalwindows service - Day light Time saving handling Pin
raju_golla9-Oct-08 23:51
raju_golla9-Oct-08 23:51 
GeneralRe: windows service - Day light Time saving handling Pin
Ashfield10-Oct-08 0:29
Ashfield10-Oct-08 0:29 
GeneralRe: windows service - Day light Time saving handling Pin
raju_golla10-Oct-08 0:37
raju_golla10-Oct-08 0:37 
QuestionDebug method for unhandled Thread and AppDomain.CurrentDomain Exceptions Pin
matixsc9-Oct-08 23:23
professionalmatixsc9-Oct-08 23:23 
Question[Message Deleted] Pin
sachinss19869-Oct-08 23:11
sachinss19869-Oct-08 23:11 
AnswerRe: Row deletion problem in Data grid Pin
Mycroft Holmes9-Oct-08 23:20
professionalMycroft Holmes9-Oct-08 23:20 
AnswerRe: Row deletion problem in Data grid Pin
DaveyM699-Oct-08 23:29
professionalDaveyM699-Oct-08 23:29 

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.