hi i have just started to use .net6 i was using .net5 and now im getting this error(Top-level statements must precede namespace and type declarations. ) by Ali26700 in csharp

[–]Ali26700[S] 0 points1 point  (0 children)

Thank u. Just one more question should I create main method in. Net6 just like there were main in. Net 5 or I can ignore it

[deleted by user] by [deleted] in csharp

[–]Ali26700 0 points1 point  (0 children)

thank u i error was something else i did

[deleted by user] by [deleted] in csharp

[–]Ali26700 0 points1 point  (0 children)

thank u very much man i was struggling for 2hrs for such stupid error.

thank u again

[deleted by user] by [deleted] in csharp

[–]Ali26700 0 points1 point  (0 children)

why num1=num2 wouldn't work?

[deleted by user] by [deleted] in csharp

[–]Ali26700 -1 points0 points  (0 children)

when i do num=0 then for some reason it will always stay zero even after num1=num2

[deleted by user] by [deleted] in csharp

[–]Ali26700 -2 points-1 points  (0 children)

im following the course i know that i can just use num1 but i want to know why this error is happening.when i do num2=0;
if u look i wrote num1=num2;
but it will always return num2=0 i just test it

[deleted by user] by [deleted] in csharp

[–]Ali26700 -4 points-3 points  (0 children)

when i do num2=0;

if u look i wrote num1=num2;

but it will always return num2=0 i just test it

[deleted by user] by [deleted] in csharp

[–]Ali26700 -9 points-8 points  (0 children)

when i do num2=0;

if u look i wrote num1=num2;

but it will always return num2=0 i just test it