A bool is a type, just as a string is a type. You can never get the bool type to show “You did it!”, Because its bool - it can only be true or false.
You want to create a string based on a logical result. It looks like you need an if :
string myString; if(myBool) // if true { myString = "You did it!"; } else { myString = "You didn't do it"; }
as @juharr showed, there are ways to do this in smaller lines of code, but this is the logic that should happen.
As a side note, you see the ToString method on bool , because every type that inherits from System.Object inherits the ToString method, giving you a string representation of this object. This is not applicable for what you want to do here.
source share