Question: There's any way to implement an **implicit** conversion from `string` to `bool` using C#?

E.g. I have the string `str` with value *Y* and when I try convert (cast) to `boolean` it must return `true`.

Answer: 
Here is an extension method that you can use for any string.

```
public static bool ToBoolean(this string input)
{
    var stringTrueValues = new[] { "true", "ok", "yes", "1", "y" };
    return stringTrueValues.Contains(input.ToLower());
}

```

Here is an example of using this extension method:

```
Console.WriteLine("y".ToBoolean());

```

The result will be `True`.
You'll need to make the method on you own. There is no way to just cast a string to a bool. You'll end up with true if the string is not null, I believe. Just make a Boolean method that returns true if the string it's passed is y or false otherwise