public void SerializeXml(System.Xml.XmlWriter writer, object obj)
{
-----------这个switch语句肯定是错误的,你知道怎么改吗?
switch (obj.GetType())
{
case Video:
SerializeXml(writer, (Video)obj);
case Video[] :
SerializeXml(writer, (Video[])obj);
case VideoResult :
SerializeXml(writer, (VideoResult)obj);
}
} public void SerializeXml(System.Xml.XmlWriter writer, Video video)
{
throw new NotImplementedException();
} public void SerializeXml(System.Xml.XmlWriter writer, Video[] videos)
{
throw new NotImplementedException();
} public void SerializeXml(System.Xml.XmlWriter writer, VideoResult videoResult)
{
throw new NotImplementedException();
}
{
-----------这个switch语句肯定是错误的,你知道怎么改吗?
switch (obj.GetType())
{
case Video:
SerializeXml(writer, (Video)obj);
case Video[] :
SerializeXml(writer, (Video[])obj);
case VideoResult :
SerializeXml(writer, (VideoResult)obj);
}
} public void SerializeXml(System.Xml.XmlWriter writer, Video video)
{
throw new NotImplementedException();
} public void SerializeXml(System.Xml.XmlWriter writer, Video[] videos)
{
throw new NotImplementedException();
} public void SerializeXml(System.Xml.XmlWriter writer, VideoResult videoResult)
{
throw new NotImplementedException();
}
解决方案 »
- 【求助】【求助】有木有人知道如何让C#程序脱离.Net Framework运行?纠结了,我的是VS2010~~~
- 如何动态获取文本框内容
- [新手求助]通过oledb连接excel的一个查询。。。。
- VSS2005在Internet访问情况下,如何通过VSS自身设置的用户登录?
- 馄饨和饺子,C#和Java,同一理念的两种表达方式
- 关于c#应用程序的部署?
- 有人用过VisualStudio2005 的office 项目模版开发过word模版吗?
- 在c#创建com+时,如何对其中对象进行clsid指定
- 我想做一个文本编辑器,它可以显示行号,像VS.NET那样的,如何做呢?
- wcf
- 有个方法不是很懂,能有人帮讲一下吗?
- 页面自动登录浙江移动网站
{
case typeof(Video).ToString():
.....
case typeof(Video[]).ToString():
....
case typeof(VideoResult).ToString():
....
}
我觉得还不如if else if好用if (obj is Video)
{
...
}
else if (obj is Video[])
{
....
}
else if (obj is VideoResult)
{
.....
}