Your lecturer is incorrect.
foreach(var type in typeof(Uri).Assembly.GetTypes())
{
if (type.IsAbstract) continue;
if (!Attribute.IsDefined(type, typeof(SerializableAttribute))) continue;
if (!typeof(MarshalByRefObject).IsAssignableFrom(type)) continue;
Console.WriteLine(type.FullName);
}
shows (and note that I only look at one assembly here):
System.Media.SoundPlayer
System.Net.FileWebRequest
System.Net.FileWebResponse
System.Net.HttpWebRequest
System.Net.HttpWebResponse
System.Diagnostics.EventLogEntry
and of course http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx shows:
[SerializableAttribute]
public class HttpWebRequest : WebRequest,
ISerializable
Noting also:
[SerializableAttribute]
public abstract class WebRequest : MarshalByRefObject,
ISerializable
For mscorlib ( typeof(object)) we get:
System.IO.Stream+SyncStream
System.IO.DirectoryInfo
System.IO.FileInfo
System.IO.MemoryStream
System.IO.TextReader+SyncTextReader
System.IO.StreamReader
System.IO.TextWriter+SyncTextWriter
System.IO.StreamWriter
System.IO.StringReader
System.IO.StringWriter
System.IO.Stream+NullStream
System.IO.TextReader+NullTextReader
System.IO.TextWriter+NullTextWriter
Enough concrete counterexample, I suspect.
, Remoting, , , - /, . .
, , :
, MarshalByRefObject , / - , [Serializable]. : [Serializable] " " (: MarshalByRefObject " " ). , proxy/stub. .