Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
AnswerRe: Splitting a list into seperate threads. Pin
Buckleyindahouse31-Aug-08 17:58
Buckleyindahouse31-Aug-08 17:58 
AnswerRe: Splitting a list into seperate threads. Pin
Guffa31-Aug-08 10:30
Guffa31-Aug-08 10:30 
QuestionMDI App, MenuStrip and Icon Pin
paas31-Aug-08 6:25
paas31-Aug-08 6:25 
AnswerRe: MDI App, MenuStrip and Icon Pin
paas1-Sep-08 4:39
paas1-Sep-08 4:39 
QuestionRefresh DataGridView on BindingSource revert Pin
AndrusM31-Aug-08 6:21
AndrusM31-Aug-08 6:21 
QuestionCalling an embedded unmanaged dll Pin
jamie55031-Aug-08 2:33
jamie55031-Aug-08 2:33 
QuestionGeneric Printer class Pin
Silvyster31-Aug-08 1:47
Silvyster31-Aug-08 1:47 
QuestionProblem referencing class library in a web service Pin
dlarkin7731-Aug-08 0:54
dlarkin7731-Aug-08 0:54 
Hi,

I have a simple class library (Common.dll) that contains one public enum

public enum Product {
Deliver = 0,
Order,
MSM
}

I have a web service that uses Common.dll

<pre>[WebMethod]
public string GetProductDescription(Common.Product product) {
if(product == Common.Product.Deliver)
{
return "Deliver";
}
else if(product == Common.Product.Order){
return "Order";
}
else if(product == Common.Product.MSM){
return "MSM";
}
return string.Empty;
}</pre>

The web service compiles without problems.

I have a simple windows forms application that has a reference to Common.dll and to the web service

I have a method which calls the web service GetProductDescription

<pre>private string GetProductDescription(Common.Product product)
{
return ws.GetProductDescription(product);
}
</pre>
I get a compiler error saying "cannot convert from 'Common.Product' to 'WindowsApplication1.localhost.Product'"

I looked at the generated code for the web reference (reference.cs) and the Product enum has been defined so it seems that it is completely ignoring the enum from Common.dll

<pre>/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3053")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.itutopia.net/WebSync3")]
public enum DataBaseAction {

/// <remarks/>
Insert,

/// <remarks/>
Update,

/// <remarks/>
Delete,
}</pre>

I'm pretty stumped as to what's causing this to happen so any advice or suggestions will be well appreciated.

Thanks,

dlarkin77
AnswerRe: Problem referencing class library in a web service Pin
#realJSOP31-Aug-08 1:11
mve#realJSOP31-Aug-08 1:11 
GeneralRe: Problem referencing class library in a web service Pin
dlarkin7731-Aug-08 2:07
dlarkin7731-Aug-08 2:07 
GeneralRe: Problem referencing class library in a web service Pin
#realJSOP31-Aug-08 2:20
mve#realJSOP31-Aug-08 2:20 
GeneralRe: Problem referencing class library in a web service Pin
dlarkin7731-Aug-08 3:02
dlarkin7731-Aug-08 3:02 
GeneralRe: Problem referencing class library in a web service Pin
#realJSOP31-Aug-08 3:33
mve#realJSOP31-Aug-08 3:33 
GeneralRe: Problem referencing class library in a web service Pin
dlarkin7731-Aug-08 3:37
dlarkin7731-Aug-08 3:37 
AnswerRe: Problem referencing class library in a web service Pin
Wendelius31-Aug-08 7:02
mentorWendelius31-Aug-08 7:02 
Questionexporting excel file to database Pin
abhijitjathar31-Aug-08 0:29
abhijitjathar31-Aug-08 0:29 
AnswerRe: exporting excel file to database Pin
Natza Mitzi31-Aug-08 2:22
Natza Mitzi31-Aug-08 2:22 
AnswerRe: exporting excel file to database Pin
MumbleB31-Aug-08 7:12
MumbleB31-Aug-08 7:12 
Questionproblem with crystal report in .net2 Pin
Member 385128630-Aug-08 22:01
Member 385128630-Aug-08 22:01 
AnswerRe: problem with crystal report in .net2 Pin
Wendelius30-Aug-08 22:29
mentorWendelius30-Aug-08 22:29 
Questionwhich is better to choose? Pin
Sajjad Izadi30-Aug-08 21:42
Sajjad Izadi30-Aug-08 21:42 
AnswerRe: which is better to choose? Pin
zafersavas30-Aug-08 23:33
zafersavas30-Aug-08 23:33 
GeneralRe: which is better to choose? [modified] Pin
Sajjad Izadi31-Aug-08 1:21
Sajjad Izadi31-Aug-08 1:21 
GeneralRe: which is better to choose? Pin
N a v a n e e t h31-Aug-08 18:06
N a v a n e e t h31-Aug-08 18:06 
AnswerRe: which is better to choose? Pin
Mbah Dhaim31-Aug-08 0:24
Mbah Dhaim31-Aug-08 0:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.