Replies: 4 comments 5 replies
-
Suggestions for API changes should go to the runtime repository. |
Beta Was this translation helpful? Give feedback.
-
It would be a huge mistake in my view if the runtime mandated that Such mappings are clearly domain specific and therefore the correct place for them to exist is in your domain logic, not within the BCL. |
Beta Was this translation helpful? Give feedback.
-
I would expect Convert.ToBoolean to return 0 for an empty string, and 1 for any other string. |
Beta Was this translation helpful? Give feedback.
-
Moving to runtime. |
Beta Was this translation helpful? Give feedback.
-
Existing version of Convert.ToBoolean, only convert from below values.
1,0, "True", "False", "true","false"
We have to apply extra conversion method Convert.ToInt32 in order to convert "1" and "0" to true and false respectively.
Also we have to write extra piece of code like below.
bool boolValue = (convertValue== "1")
Shall we need to improve the method without writing any extension method or using above solutions?
Perhaps, an improvement can be made for the problem as future works
Beta Was this translation helpful? Give feedback.
All reactions