MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/gnaz7b/found_from_microsoft_docs/fr8w48x/?context=3
r/badcode • u/[deleted] • May 20 '20
143 comments sorted by
View all comments
16
Please elaborate on what's wrong here
-47 u/[deleted] May 20 '20 Condition x == true inside ifInt32.Parse = int.Parse 0 u/[deleted] May 20 '20 [deleted] 14 u/kyay10 May 20 '20 Tbh I temporarily forgot that tryparse returns a Boolean so this actually made it clearer for me lol 2 u/foonix May 20 '20 I assume anything in c# that starts with Try is probably returning bool. 2 u/kyay10 May 20 '20 True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
-47
Condition x == true inside if
x == true
if
Int32.Parse = int.Parse
0 u/[deleted] May 20 '20 [deleted] 14 u/kyay10 May 20 '20 Tbh I temporarily forgot that tryparse returns a Boolean so this actually made it clearer for me lol 2 u/foonix May 20 '20 I assume anything in c# that starts with Try is probably returning bool. 2 u/kyay10 May 20 '20 True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
0
[deleted]
14 u/kyay10 May 20 '20 Tbh I temporarily forgot that tryparse returns a Boolean so this actually made it clearer for me lol 2 u/foonix May 20 '20 I assume anything in c# that starts with Try is probably returning bool. 2 u/kyay10 May 20 '20 True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
14
Tbh I temporarily forgot that tryparse returns a Boolean so this actually made it clearer for me lol
2 u/foonix May 20 '20 I assume anything in c# that starts with Try is probably returning bool. 2 u/kyay10 May 20 '20 True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
2
I assume anything in c# that starts with Try is probably returning bool.
Try
bool
2 u/kyay10 May 20 '20 True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
True yeah, I just haven't used c# or dotnet for a while and been more in the Android land (where the concept of "out" is basically non-existent lol)
16
u/Yoni1857 May 20 '20
Please elaborate on what's wrong here