###A: 95 bytes
A: 95 bytes
###B: 438 + 18 bytes
B: 438 + 18 bytes
###A+B: 533 + 18 bytes
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack Internal###A: 95 bytes
###B: 438 + 18 bytes
###A+B: 533 + 18 bytes
###A: 95 bytes
###B: 438 + 18 bytes
###A+B: 533 + 18 bytes
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to 0, and then runs the Main method of Class B, which does the same as Program A because A.iA.i is less than 1, and returns before any of the weird stuff. The newlines aren't necessary here, but are important for A+B.
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to 0, and then runs the Main method of Class B, which does the same as Program A because A.i is less than 1, and returns before any of the weird stuff. The newlines aren't necessary here, but are important for A+B.
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to 0, and then runs the Main method of Class B, which does the same as Program A because A.i is less than 1, and returns before any of the weird stuff. The newlines aren't necessary here, but are important for A+B.
###A: 9895 bytes
class A{public static boolint i=1<0;statici=2;static void Main(string[]args){System.Console.Write(args[0]);}}// ###B: 442438 + 18 bytes
class A{public static boolint i=1>0;i=0;} class B{static void Main(string[]args){if(A.ii<1){System.Console.Write(args[0]);return;}var a="classa=@"class A{{public static boolint i=1<0;statici=2;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static boolint i=1>0;i=0;}}\nclass class B{{static void Main(string[]args){{if(A.ii<1){{System.Console.Write(args[0]);return;}}var a=a=@{0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} ###A+B: 540533 + 18 bytes
class A{public static boolint i=1<0;statici=2;static void Main(string[]args){System.Console.Write(args[0]);}}//class A{public static boolint i=1>0;i=0;} class B{static void Main(string[]args){if(A.ii<1){System.Console.Write(args[0]);return;}var a="classa=@"class A{{public static boolint i=1<0;statici=2;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static boolint i=1>0;i=0;}}\nclass class B{{static void Main(string[]args){{if(A.ii<1){{System.Console.Write(args[0]);return;}}var a=a=@{0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} Program A is straightforward. Class A contains an (unused) static variable i initialized to false2, and prints its first argument when run. The // at the end is important for the A+B code, but does nothing in A itself.
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to true0, and then runs the Main method of Class B, which does the same as Program A because A.i is trueless than 1, and returns before any of the weird stuff. The newline between the classes isn'tnewlines aren't necessary here, but isare important for A+B.
When combined, the // from Program A comments out the Class A declaration from Program B, but because of the newline Class B is fine, allowing A.i to refer to the false2 value from Program A instead. The Compiler Flag makes the Program run B.Main() since A.Main() also exists. The result is that Program A+B does not output its argument, but instead goes to the following segment of B.Main(), which is basically just the standard C# quine.
###A: 98 bytes
class A{public static bool i=1<0;static void Main(string[]args){System.Console.Write(args[0]);}}// ###B: 442 + 18 bytes
class A{public static bool i=1>0;} class B{static void Main(string[]args){if(A.i){System.Console.Write(args[0]);return;}var a="class A{{public static bool i=1<0;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static bool i=1>0;}}\nclass B{{static void Main(string[]args){{if(A.i){{System.Console.Write(args[0]);return;}}var a={0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} ###A+B: 540 + 18 bytes
class A{public static bool i=1<0;static void Main(string[]args){System.Console.Write(args[0]);}}//class A{public static bool i=1>0;} class B{static void Main(string[]args){if(A.i){System.Console.Write(args[0]);return;}var a="class A{{public static bool i=1<0;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static bool i=1>0;}}\nclass B{{static void Main(string[]args){{if(A.i){{System.Console.Write(args[0]);return;}}var a={0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} Program A is straightforward. Class A contains an (unused) static variable i initialized to false, and prints its first argument when run. The // at the end is important for the A+B code, but does nothing in A itself.
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to true, and then runs the Main method of Class B, which does the same as Program A because A.i is true, and returns before any of the weird stuff. The newline between the classes isn't necessary here, but is important for A+B.
When combined, the // from Program A comments out the Class A declaration from Program B, but because of the newline Class B is fine, allowing A.i to refer to the false value from Program A instead. The Compiler Flag makes the Program run B.Main() since A.Main() also exists. The result is that Program A+B does not output its argument, but instead goes to the following segment of B.Main(), which is basically just the standard C# quine.
###A: 95 bytes
class A{public static int i=2;static void Main(string[]args){System.Console.Write(args[0]);}}// ###B: 438 + 18 bytes
class A{public static int i=0;} class B{static void Main(string[]args){if(A.i<1){System.Console.Write(args[0]);return;}var a=@"class A{{public static int i=2;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static int i=0;}} class B{{static void Main(string[]args){{if(A.i<1){{System.Console.Write(args[0]);return;}}var a=@{0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} ###A+B: 533 + 18 bytes
class A{public static int i=2;static void Main(string[]args){System.Console.Write(args[0]);}}//class A{public static int i=0;} class B{static void Main(string[]args){if(A.i<1){System.Console.Write(args[0]);return;}var a=@"class A{{public static int i=2;static void Main(string[]args){{System.Console.Write(args[0]);}}}}//class A{{public static int i=0;}} class B{{static void Main(string[]args){{if(A.i<1){{System.Console.Write(args[0]);return;}}var a=@{0}{1}{0};System.Console.Write(a,'{0}',a);}}}}";System.Console.Write(a,'"',a);}} Program A is straightforward. Class A contains an (unused) static variable i initialized to 2, and prints its first argument when run. The // at the end is important for the A+B code, but does nothing in A itself.
Program B is weird in isolation, but essentially the same. It creates a Class A containing a static variable i initialized to 0, and then runs the Main method of Class B, which does the same as Program A because A.i is less than 1, and returns before any of the weird stuff. The newlines aren't necessary here, but are important for A+B.
When combined, the // from Program A comments out the Class A declaration from Program B, but because of the newline Class B is fine, allowing A.i to refer to the 2 value from Program A instead. The Compiler Flag makes the Program run B.Main() since A.Main() also exists. The result is that Program A+B does not output its argument, but instead goes to the following segment of B.Main(), which is basically just the standard C# quine.