interface

Discussion in 'MCSD' started by disillusioned_01, Dec 29, 2003.

  1. while defining an intreface
    Why do we need to give variables names ?
    like 'index' in the following eg.
    Since variable binding will be done only at the
    implementation of interface I don't see the need to give
    varible names .
    Could a mix of c syntax be better eg..string this[int] {
    get; set; }

    Assume that 'index' will be never used

    Interface IExample
    {
    string this[int index] { get; set; }
    event EventHandler E;
    void F(int value);
    string P { get; set; }
    }


    -- ignorant
     
    disillusioned_01, Dec 29, 2003
    #1
    1. Advertising

  2. disillusioned_01

    Jay Walters Guest

    :)

    I can't believe you're mad enough to post a msg about it.

    Happy New Year (hiccup)


    >-----Original Message-----
    >
    >while defining an intreface
    >Why do we need to give variables names ?
    >like 'index' in the following eg.
    >Since variable binding will be done only at the
    >implementation of interface I don't see the need to give
    >varible names .
    >Could a mix of c syntax be better eg..string this[int] {
    >get; set; }
    >
    >Assume that 'index' will be never used
    >
    >Interface IExample
    >{
    > string this[int index] { get; set; }
    > event EventHandler E;
    > void F(int value);
    > string P { get; set; }
    >}
    >
    >
    >-- ignorant
    >.
    >
     
    Jay Walters, Dec 31, 2003
    #2
    1. Advertising

  3. Belated New year wishes

    >-----Original Message-----
    >:)
    >
    >I can't believe you're mad enough to post a msg about it.
    >
    >Happy New Year (hiccup)
    >
    >
    >>-----Original Message-----
    >>
    >>while defining an intreface
    >>Why do we need to give variables names ?
    >>like 'index' in the following eg.
    >>Since variable binding will be done only at the
    >>implementation of interface I don't see the need to

    give
    >>varible names .
    >>Could a mix of c syntax be better eg..string this[int]

    {
    >>get; set; }
    >>
    >>Assume that 'index' will be never used
    >>
    >>Interface IExample
    >>{
    >> string this[int index] { get; set; }
    >> event EventHandler E;
    >> void F(int value);
    >> string P { get; set; }
    >>}
    >>
    >>
    >>-- ignorant
    >>.
    >>

    >.
    >
     
    disiilusioned_01, Jan 2, 2004
    #3
  4. disillusioned_01 wrote:

    > while defining an intreface
    > Why do we need to give variables names ?


    Why would you want to put a variable in an interface?
     
    General Protection Fault, Jan 5, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David

    PCI interface or USB interface

    David, Sep 14, 2004, in forum: Wireless Networking
    Replies:
    4
    Views:
    705
    David
    Sep 16, 2004
  2. Andrea
    Replies:
    0
    Views:
    886
    Andrea
    Apr 19, 2004
  3. jonnah
    Replies:
    1
    Views:
    1,271
    mcaissie
    Apr 21, 2004
  4. no-one
    Replies:
    0
    Views:
    1,595
    no-one
    Jul 28, 2004
  5. AM
    Replies:
    4
    Views:
    902
Loading...

Share This Page