3 ms·
FYI >> Using Statement - Defines the scope for your application’s objects and disposes them when they’re done. This isn’t super important now, but I’m going to
by bruceboughton 14y ago
FYI
>> Using Statement - Defines the scope for your application’s objects and disposes them when they’re done. This isn’t super important now, but I’m going to cover some other ways we can implement using statements in C#. What you need to know now is it’s including the types in the System namespace in your scope so you can use them.
This is entirely wrong. The 'using' in your example is the using directive, not the using statement. They are entirely unrelated.
http://msdn.microsoft.com/en-US/library/sf0df423(v=vs.80).aspx http://msdn.microsoft.com/en-US/library/sf0df423(v=vs.80).as... - using directive
http://msdn.microsoft.com/en-US/library/yh598w02(v=vs.80).aspx http://msdn.microsoft.com/en-US/library/yh598w02(v=vs.80).as... - using statement
Also, I really don't see why you are focussing on using the command line to compile programs. This is really not user friendly. The possibility for mistake is very high, which will certainly throw the target user of his/her tracks.
- JeremyMorgan 14y agoAfter looking at the documentation I believe you're correct. I'll fix my explanation of this so it doesn't confuse. Thank you. My reason for focusing on the command line is simply because I want the reader to focus on the code, and the nitty gritty. The possibility of mistakes is high, which they'll learn from. Visual Studio is the greatest tool I've ever used and you can't really build anything valuable without it but as a new programmer it also serves as training wheels that can build bad habits and hamper learning. That's my reason for doing the notepad / command prompt angle.
- bbotond 14y agoI agree about the IDE building bad habits. Almost all people I know who started programming in Visual Studio have atrocious formatting habits - they believe code formatting is something they don't need to care about because the IDE will do it automatically for them.
- skrebbel 14y ago> Also, I really don't see why you are focussing on using the command line to compile programs. This is really not user friendly. The possibility for mistake is very high, which will certainly throw the target user of his/her tracks. I disagree. In the Netherlands, the driving exam includes being able to accelerate from a standstill while facing uphill. On first glance, this is ridiculous, since virtually all of the Netherlands is flat (and by that I entirely flat). It is a big hassle and hampers learning, because driving instructors have to drive long detours just to get to a city's single 5 meter long sloped road. More learning time is wasted, because there's a queue before that slope, entirely made up of other driving students (not kidding!). However, at second glance, you realize that learning this useless thing is great because it allows you to do more with your car than the absolute basics. For example, I can take a car holiday abroad or queue in parking garages without getting nervous about how that thing with the hand break worked again. It's similar for programming. As these tutorials are clearly meant for learning C# as a first programming language, immediately giving the user tools that do some of the hard work for them hampers their learning, because it is difficult for them to separate between the programming language concept and its corresponding tool support. By learning the concepts independently from the tool (both language constructs and compiler toolchain concepts), the learner gets a more general understanding of what's going on. Need to do Go later? Ah, a compiler, I know what that is. Need to do Ruby later? Ah, no worries, I've done without autocomplete before, and oh, hey, classes and methods!
- Surio 14y agoA great analogy.