We pay for user submitted tutorials and articles that we publish. Anyone can send in a contributionLearn More
Getting an array length in C# is a trivial task. All we need to so is call the Length property of the Array Class:
int arr = new int; int arrLength = arr.Length;
Getting an array length in C++ might be less trivial:
int arr; int arrSize = sizeof(arr) / sizeof(int);
Notice that sizeof(arr) returns the array size in bytes, not its length…
After publishing 10 Visual Studio shortcuts you must know and then 11 more Visual Studio shortcuts, a colleague of mine, Elan Kynsky, introduced me an MSDN page called Visual Studio 2005 IDE Tips and Tricks. This is a long article where you can learn a couple of useful things about Visual Studio, but what attracted me most, was the “Creating a keyboard shortcuts cheat sheet” section.
As we all know, there are a lot of keyboard shortcuts in Visual Studio. We mentioned only 21 of them here at Dev102.com but according to this article, there are about 450 shortcuts available. That fact, made me realize that I know less than 10% of them… Fortunately, we can write a macro that enumerate all of the available shortcuts. To achieve that goal, go to Tools->Macros->”Macros IDE”, a macros window will pop up, expand the MyMacros project (in the project explorer), expand MyMacros namespace and double click on Module1. Copy the following code to the Macros IDE and run it.
Copyright © 2012 Dev102.com
Breeze : Designed by Amit Raz and Nitzan Kupererd