-1
如何知道这件事情在哪里发生?错误序列化值
我的目标是复杂的跟踪和测试每一个,我确定有一种方法来找到这个问题的线没有?
在我的情况下即时通讯使用视图状态,这使得这个序列化,在我的对象有一些枚举出类,它也可能会造成这个问题?
PropertyInfo[] properties = GetType().GetProperties();
foreach (PropertyInfo property in properties)
{
object[] attributes = property.GetCustomAttributes(typeof(PersistToViewState), true);
if (attributes.Length > 0)
ViewState[property.Name] = property.GetValue(this, null);
}
return base.SaveViewState();
编译器是否生成错误消息?如果是这样,请发布。如果错误是某些东西在运行时不起作用,请说明您希望发生什么以及发生了什么*实际*。 – JTeagle 2012-03-27 09:02:11