What's the difference between the two codes such that the 1st and 2nd codes do not output any error but outputs the same result | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the difference between the two codes such that the 1st and 2nd codes do not output any error but outputs the same result

https://code.sololearn.com/cwmI13kavBfG/?ref=app https://code.sololearn.com/cZBrI6mfHtgR/?ref=app

6th Jan 2021, 12:35 PM
eMBee
eMBee - avatar
5 Answers
+ 2
Thank you СОБАКА => Дебил / Retard for that code, I'll practice more with the code you shared
6th Jan 2021, 9:06 PM
eMBee
eMBee - avatar
+ 1
Thanks for that observation СОБАКА => Дебил / Retard
6th Jan 2021, 6:21 PM
eMBee
eMBee - avatar
0
However, there was another case I saw similar to this that gave an error
6th Jan 2021, 6:26 PM
eMBee
eMBee - avatar
0
For instance in my code СОБАКА => Дебил / Retard, if I put the code below at the beginning of my program, and remove it at the end, it throws no error but if it is done the other way round it throws an error why exactly is that? static void Main(string[] args) { string[] words = { "home", "programming", "victory", "C#", "football", "sport", "book", "learn", "dream", "fun" }; https://code.sololearn.com/cxmJ3k9ka7dF/?ref=app
6th Jan 2021, 6:49 PM
eMBee
eMBee - avatar
0
I think I'm getting it nowСОБАКА => Дебил / Retard So apart from struct and static, what other instance of Main methods do we have in C#
6th Jan 2021, 7:22 PM
eMBee
eMBee - avatar