TarekSiala
TarekSiala

Reputation: 36

How send data in object to function in same object?

I see this C# Source Code:

User user = new User();
User.Name = "asd";
User.EMail = "[email protected]";
User.Create();

My question: how i can send data to Create function ? i mean what code i must write it in create function ?

Upvotes: 0

Views: 54

Answers (1)

Smog
Smog

Reputation: 604

to pass 'data' to your create method you need to rewrite it to something like this

public static string Create(User user)

and to call it

User.Create(user)

for more on this topic you should refer to

http://msdn.microsoft.com/en-us/library/ms173114.aspx

Upvotes: 1

Related Questions