a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
adriancole's profile
adriancole

x 0

stats
following: 0
followed tags: 0
followed domains: 0
badges given: 0 of 0
hubskier for: 2490 days

recent comments, posts, and shares:
adriancole  ·  2490 days ago  ·  link  ·    ·  parent  ·  post: When would you use a struct instead of a class in C#

The general rule to follow is that structs should be small, simple (one-level) collections of related properties, that are immutable once created; for anything else, use a class.

C# is nice in that structs and classes have no explicit differences in declaration other than the defining keyword; so, if you feel you need to "upgrade" a struct to a class, or conversely "downgrade" a class to a struct, it's mostly a simple matter of changing the keyword (there are a few other gotchas; structs can't derive from any other class or struct type, and they can't explicitly define a default parameterless constructor).

adriancole  ·  2490 days ago  ·  link  ·    ·  parent  ·  post: Programmer's Learning Machine (PLM)

Thanks for that heads up. Never heard of it before. I feel codeacademy is good with some limitations.

Hope wont face such issues on connectivity with PLM. Sure ll give it a try for Java once.

adriancole  ·  2490 days ago  ·  link  ·    ·  parent  ·  post: MS Paint recreated *faithfully* in JavaScript

It is pretty good. I loved it coz you could easily apply on your paint needs.