Coffeehouse Post

Single Post Permalink

View Thread: Why does C# not support this?
  • User profile image
    Ion Todirel

    Maddus Mattus said:
    Massif said:
    *snip*

    That I can do this:

     

    FinanceResult<FinanceItem> GetActuals();

    FinanceResult<FinanceItem, Dimension1, Dimension2> GetActuals();

     

    But I guess I should do:

     

    FinanceResult<FinanceItem> GetActuals();

    FinanceResult<FinanceItem, Dimension1, Dimension2> GetActuals<Dimension1, Dimension2>();

     

    Boring Smiley

    Gosh, the right way to do it:

     

    public interface FinanceService // Just for grouping

    {

        FinanceResult<FinanceItem> GetActuals();

        FinanceResult<FinanceItem, Dimension1, Dimension2> GetActualsWithDimension();

    }