using System;
using System.Runtime.Serialization;
throw new SimpleException(); //<- Error
throw new RecommendExc("exeption"); //<- Error
class SimpleException: Exception { }
class RecommendExc: Exception {
//recommended constructors
public RecommendExc () { }
public RecommendExc(string message) : base( message ) { }
public RecommendExc(string message, Exception inner) : base ( message,
inner ) { }
protected RecommendExc(SerializationInfo info,
StreamingContext context): base ( info, context ) { }
//... any other members
}