#im 30 days into C#

11 messages · Page 1 of 1 (latest)

radiant notchBOT
#

@waxen grail

File Attachments Not Allowed

For safety reasons we do not allow files with certain file extensions.

dad_123456 Said

i want you to rate my code (yes its small but i didnt spend alot of time on it)

Code Formatting

You can share your code using triple backticks like this:
```
YOUR CODE
```

Large Portions of Code

For longer scripts use Hastebin or GitHub Gists and share the link here

Ignored these files due to them having disallowed file extensions
  • message.txt
waxen grail
noble nova
#

Looks good!

#

I'd suggest not calling Main and instead put your code in a loop!

waxen grail
#

how do i put my code in a loop?, isnt calling main inside something like a function already a loop?

noble nova
#

It is! It's just that at the moment you are adding additional stack frames each time you call Main.

#

This will result in a memory leak.

waxen grail
#

oh

noble nova
#

Think of each time you call a function like a side quest. Ideally you want to come back to the main story, but in your example you will never get back

#

Since every function call and well block ends up with another call to Main.

#

Now practically for your program is this really an issue? No. But it's good practice to code in a way that doesn't just leak.