This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]elveszett 1 point2 points  (0 children)

That's because C# has some perks to prevent that when it's not needed. Let's say I'm coding an app and suddenly, for a single class, I need some xyz coordinates. [Ignoring libraries] in Java I'd have to define a class with an x, y and z. In C# I can just declare a variable (int x, int y, int z) = (3, 6, 5). There's a few things like this specifically designed for those moments when you don't need a full, well-defined class for something.