Webservice 代码:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
namespace WSstruct
{
/// <summary>
/// Service1 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
public struct MyStruct
{
public string myString;
public decimal mydecimal;
}
}
引用后怎么都找不到 MyStruct?求解?
------解决方案--------------------
在服务中使用一下,引用方就会来取了
[WebMethod]
public MyStruct GetMyStruct()
{
throw new NotImplementedException();
}