Created
April 23, 2012 22:56
-
-
Save jmaxxz/2474399 to your computer and use it in GitHub Desktop.
You can't handle the truth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Truth | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
try | |
{ | |
throw new TheTruth(); | |
} | |
catch (Exception) | |
{ | |
throw; | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System;namespace Truth { public class TheTruth : Exception {public TheTruth(){} private TheTruth(int b) { Console.WriteLine("The truth");} public override string StackTrace { get { throw new TheTruth(1); } } public override System.Collections.IDictionary Data { get { throw new TheTruth(1); } } public override string ToString() { throw new TheTruth(1); } public override Exception GetBaseException() { throw new TheTruth(1); } public override bool Equals(object obj) { throw new TheTruth(1); } public override int GetHashCode() { throw new TheTruth(1); } public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { throw new TheTruth(1); } public override string HelpLink { get { throw new TheTruth(1); } set { throw new TheTruth(1); } } public override string Message { get { throw new TheTruth(1); } } public override string Source { get { throw new TheTruth(1); } set { throw new TheTruth(1); } } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment