Click here to Skip to main content
15,906,625 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exporting to Excel / PDF file from the Reportviewer using my own button Pin
Yeates25-Sep-08 21:14
Yeates25-Sep-08 21:14 
QuestionValue Member Property for DataGridViewComboboxColumn Pin
Uma Dilip25-Sep-08 5:25
Uma Dilip25-Sep-08 5:25 
QuestionRe: Value Member Property for DataGridViewComboboxColumn Pin
nelsonpaixao25-Sep-08 12:09
nelsonpaixao25-Sep-08 12:09 
QuestionInterface Inheritance Q? Pin
Ware@Work25-Sep-08 4:40
Ware@Work25-Sep-08 4:40 
AnswerRe: Interface Inheritance Q? Pin
mark_w_25-Sep-08 4:47
mark_w_25-Sep-08 4:47 
AnswerRe: Interface Inheritance Q? Pin
led mike25-Sep-08 5:03
led mike25-Sep-08 5:03 
QuestionRe: Interface Inheritance Q? Pin
Ware@Work25-Sep-08 5:32
Ware@Work25-Sep-08 5:32 
AnswerRe: Interface Inheritance Q? Pin
J4amieC25-Sep-08 5:44
J4amieC25-Sep-08 5:44 
Ware@Work wrote:
How do I define IBaseObject to imply that the FirstPaymentDate property is the same in both the IBaseObject definition and the ICalculatable definition?


You leave it off of IBaseObject altogether, as IBaseObject inhertits from ICalculatable (and assuming you implicitly implement the interface) any instance of a class which implements IBaseObject will have access to the required method.

Scratch all that, I see it is get/set in IBaseObject and get only in ICalculatable. In which case I would do it as follows:

public class BaseObject : IBaseObject
{

    #region IBaseObject Members

    public string Identifier
    {
        get { throw new NotImplementedException(); }
    }

    public DateTime FirstPaymentDate
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }

    public decimal InterestRate
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }

    #endregion

    #region ICalculatable Members


    public decimal MonthlyCompoundingRate
    {
        get { throw new NotImplementedException(); }
    }

    #endregion
}


Anything that has a reference to BaseObject (or IBaseObject) can get/set FirstPaymentdate. However anything with a reference to ICalculatable will only be able to get.
GeneralRe: Interface Inheritance Q? Pin
Ware@Work25-Sep-08 6:19
Ware@Work25-Sep-08 6:19 
GeneralRe: Interface Inheritance Q? Pin
J4amieC25-Sep-08 6:27
J4amieC25-Sep-08 6:27 
GeneralRe: Interface Inheritance Q? Pin
mark_w_25-Sep-08 6:31
mark_w_25-Sep-08 6:31 
AnswerRe: Interface Inheritance Q? Pin
Ennis Ray Lynch, Jr.25-Sep-08 7:13
Ennis Ray Lynch, Jr.25-Sep-08 7:13 
QuestionReporting Pin
mark_w_25-Sep-08 4:40
mark_w_25-Sep-08 4:40 
AnswerRe: Reporting Pin
Ennis Ray Lynch, Jr.25-Sep-08 7:15
Ennis Ray Lynch, Jr.25-Sep-08 7:15 
GeneralRe: Reporting Pin
nelsonpaixao25-Sep-08 12:28
nelsonpaixao25-Sep-08 12:28 
QuestionCodeDom Type cast bug Pin
Paw Jershauge25-Sep-08 2:45
Paw Jershauge25-Sep-08 2:45 
AnswerRe: CodeDom Type cast bug Pin
J4amieC25-Sep-08 3:20
J4amieC25-Sep-08 3:20 
GeneralRe: CodeDom Type cast bug Pin
Paw Jershauge25-Sep-08 4:07
Paw Jershauge25-Sep-08 4:07 
GeneralRe: CodeDom Type cast bug Pin
leppie25-Sep-08 4:39
leppie25-Sep-08 4:39 
GeneralRe: CodeDom Type cast bug Pin
J4amieC25-Sep-08 5:16
J4amieC25-Sep-08 5:16 
GeneralRe: CodeDom Type cast bug Pin
Paw Jershauge25-Sep-08 11:31
Paw Jershauge25-Sep-08 11:31 
AnswerRe: CodeDom Type cast bug Pin
leppie25-Sep-08 4:41
leppie25-Sep-08 4:41 
QuestionHttp basic authentication issue Pin
George_George25-Sep-08 2:42
George_George25-Sep-08 2:42 
AnswerRe: Http basic authentication issue Pin
Ennis Ray Lynch, Jr.25-Sep-08 3:08
Ennis Ray Lynch, Jr.25-Sep-08 3:08 
GeneralRe: Http basic authentication issue Pin
George_George25-Sep-08 3:12
George_George25-Sep-08 3:12 

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.