Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Can a == true && a == false be true in C#?
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { // https://www.pixelstech.net/article/1521963067-Can-a-==-true-&-&-a-==-false-be-true-in-JavaScript class A { int _value = 1; public static implicit operator bool(A a) { return (a._value--) != 0; } } public static void Main(string[] args) { A a = new A(); Console.WriteLine("a == true && a == false ? {0}", a == true && a == false); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
sdfrgthyjujyhtgtg
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( yield version ) ♦
Types
c# abstract
sum of two array elements
DijkstraAlgo
utf-8 string to bytes and back
Golden Ratio Approximation
005
Read XML nodes into Data Dictionary
Please log in to post a comment.