c# - Returning Struct from Class -



c# - Returning Struct from Class -

so trying phone call function in class called dmlib. if homecoming list of structs, how can bring main. example:

struct:

public struct folder { public int fid; public string name; public int type; public int totalmessages; }

class fellow member decleration:

public list<folder> getfolders(string sessionkey)

class fellow member phone call main.cs:

list<folder> folders = new list<folder>(); folders = (list<folder>)dmlib.getfolders(sessionkey);

error:

this error says list of struct folder defined in main.cs can not converted list of struct folder class. how can create conversion happen?

either alter declaration of folder type qualified include namespace, or declare using aliases @ top, each of namespaces 2 folder types reside in, , utilize alias in code.

c# struct return

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -