[Serializable]是什么意思呀?
如下代码中,[Serializable]是什么意思呢?
另外,这个代码是泛型 Nullable<T> 的结构定义,我不明白的是,这里为何只有函数签名呀,
具体的实现代码为何没有呀,具体的代码,如何能够看到呢?“转到定义”看不见呀。
难道在另外的文件中,有函数体的具体实现,如果是的话,在哪里呢?
namespace System
{
[Serializable]
public struct Nullable<T> where T : struct
{
public Nullable(T value);
public static explicit operator T(T? value);
public static implicit operator T?(T value);
public bool HasValue { get; }
public T Value { get; }
public override bool Equals(object other);
public override int GetHashCode();
public T GetValueOrDefault();
public T GetValueOrDefault(T defaultValue);
public override string ToString();
}
}
如下代码中,[Serializable]是什么意思呢?
另外,这个代码是泛型 Nullable<T> 的结构定义,我不明白的是,这里为何只有函数签名呀,
具体的实现代码为何没有呀,具体的代码,如何能够看到呢?“转到定义”看不见呀。
难道在另外的文件中,有函数体的具体实现,如果是的话,在哪里呢?
namespace System
{
[Serializable]
public struct Nullable<T> where T : struct
{
public Nullable(T value);
public static explicit operator T(T? value);
public static implicit operator T?(T value);
public bool HasValue { get; }
public T Value { get; }
public override bool Equals(object other);
public override int GetHashCode();
public T GetValueOrDefault();
public T GetValueOrDefault(T defaultValue);
public override string ToString();
}
}
序列化是指将对象实例的状态存储到存储媒体的过程
http://msdn.microsoft.com/zh-cn/library/system.serializableattribute(v=VS.80).aspx