Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. <key value=""> collection as a parameter in an interface method</key>

<key value=""> collection as a parameter in an interface method</key>

Scheduled Pinned Locked Moved C#
questioncsharpcom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chiman1
    wrote on last edited by
    #1

    Hi, I have created two library (COM) in C# , and i have a interface method as UpdateData() in a component. Now i need t0 pass a collection as a parameter in an interface method. How can i ac chive this. Can i pass a map object as a parameter in an interface method??

    A 1 Reply Last reply
    0
    • C Chiman1

      Hi, I have created two library (COM) in C# , and i have a interface method as UpdateData() in a component. Now i need t0 pass a collection as a parameter in an interface method. How can i ac chive this. Can i pass a map object as a parameter in an interface method??

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Are you talking about using a dot net collection parameter in a dot net interace method? Could you please provide some more details so that the scenario becomes clearer?

      There's nothing left in my right brain and nothing right in my left brain.

      modified on Thursday, December 10, 2009 12:40 PM

      C 1 Reply Last reply
      0
      • A Abhinav S

        Are you talking about using a dot net collection parameter in a dot net interace method? Could you please provide some more details so that the scenario becomes clearer?

        There's nothing left in my right brain and nothing right in my left brain.

        modified on Thursday, December 10, 2009 12:40 PM

        C Offline
        C Offline
        Chiman1
        wrote on last edited by
        #3

        ok.. Let say .. Interface IMyInterface { void DisplayData(??????); } Class MyClass : IMyInterface { void IMyInterface.DisplayData(??????) { Logic to display data Display First Name , Display last name... } } ///From client. Class Client { //I have a data structure (some data container or .net collection obj) , which saves data in a<< key , value >> format .. MyClass myclass = new MyClass() myclass.DisplayData( ???) } My question is how can i pass a collection data structure as a parameter in a interface DisplayData() method ?? Can i directly pass a collection object in interface method?? (Please note that this is an interface method and can be used by other languages.)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups