Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Cross-Platform Mobile Development in C#
This is the forum to discuss the Wrox book Professional Cross-Platform Mobile Development in C# by Scott Olson, John Hunter, Ben Horgen, Kenny Goers; ISBN: 978-1-1181-5770-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Cross-Platform Mobile Development in C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 30th, 2012, 07:36 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to share a WCF class

can anyone suggest the best way to deal with a class that's shared between a client and WCF?

I'm just beginning to test things out. I've taken the console class as-is and added it to a project that includes a WCF project. and I'm trying to replace the existing GetCustomer call with the RESTful GetCustomer call that I've put in my WCF service. the problem is that I get a conflict between the two (but identical) classes (I had to add the "Customer" class to my WCF Visual Studio project). I assume this is a simple problem for those who understand the principles of object-oriented programming. I'm only now trying to do things the right way ;-)

I've actually just solved the compilation problem by simply taking out the class definitions in the client (almost too obvious), but the only curious thing is that I had to change the CustomerView Render method, to change Count from a property to a method by simply adding parentheses.

Last edited by kware; October 30th, 2012 at 08:34 AM.. Reason: realized what caused the compilation error


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is WCF, WPF? vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 28th, 2014 12:12 PM
What is WCF, WPF? vbboyd ASP.NET 4 General Discussion 0 April 26th, 2012 11:47 AM
wcf help!!! marino .NET Framework 3.5 0 March 24th, 2010 11:37 AM
WCF yangqingyue1985 C# 0 July 28th, 2008 02:17 AM
WCF endpoint error when wrapping WCF service with jdawg1979 Visual Studio 2008 0 July 8th, 2008 11:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.