I’m developing a Silverlight (4, if that makes a difference) application, and I’m wondering if there is a way to share constants from the server side to the client side, rather than copying over a class that would contain the constants?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes there is. Create a shared assembly see here, and then reference it into both applications.
Or you can share code, create a file in the server side project, then add it as a LINK to the silverlight project, so it will be compiled twice. (see here for adding as link).
I recommend the first approach if possible!