return struct from asp.net web service method

This is a discussion on return struct from asp.net web service method within the C# Programming forums, part of the General Programming Boards category; I am trying to return a basic struct (just testing for the moment... it's mad up of only int data ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    2,432

    return struct from asp.net web service method

    I am trying to return a basic struct (just testing for the moment... it's mad up of only int data types) from a web method, but it tells me that I can't because it doesn't implement IEnumerable. I looked up how to implement IEnumerable, but the only information I can find is on how to implement it for an object that is used as a container for a collection or array. I want to just return a single object. is that even possible? if so, how would I go about doing it?

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Post your code. It sounds like you are returning improperly or calling the function in the wrong context, IE in a foreach loop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting from C to C++
    By Taka in forum C++ Programming
    Replies: 5
    Last Post: 04-08-2009, 02:16 AM
  2. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 03:25 AM
  3. Replies: 10
    Last Post: 05-18-2006, 11:23 PM
  4. Alegro closes out on me
    By campsoup1988 in forum C++ Programming
    Replies: 8
    Last Post: 04-03-2006, 10:40 AM
  5. C++ FTP class won't work
    By lord mazdak in forum C++ Programming
    Replies: 8
    Last Post: 12-18-2005, 06:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21