how to posting an entity in web service

i know how to make webmethods and offer functions on web service for others
once i used a web service from a client system . when i added the web reference i saw some methods , and also saw an entity, I could define instance in my code with that entity and call any methods that entity can I do the same for the others on web service?
im using c# .net
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Najam UddinCommented:
If you open reference.cs in you projects servicereference folder you will see that a proxy classes are generated for every thing exposed through web method. Other than those nothing is exposed. Any class that is a parameter, or return type of a webmethod is in exposed at client side of service.
A class is exposed with all child objects, so in short if you want to expose any class to client side then either it has to appear in any web method or as a child class of any other exposed class

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hukakaAuthor Commented:
sorry najam , im kind of junior , dont understand your answer.
to create a web method ,I just need to open and web service project and add [webmethod] before a class or a method,its all done .
what to do with an entity , no idea how to create one in web service project
hukakaAuthor Commented:
learnt how to do that fomr another post in exchange.
and reread najam's answer , he was right ,I just failed to understand him
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.