Spelly is a Visual Studio addin that allows you to easily spell-check source code and/or comments. Spelly is smart enough to understand identifiers with under_scores and MixedCase.
Spelly is available for both Visual Studio .NET and Visual C++ 5/6.
Did you know that any malicious user can corrupt your database by injecting harmful SQL strings? To prevent SQL injection, you can use the parameters collections when building SQL strings. However, I developed a more sophisticated method to construct SQL statements from user's input and execute them safely. In this article I describe how to write and execute SQL statements by using objects instead of SQL strings. These objects also address specific SQL statement syntax issues on different RDBMS: they enable you to write generic and RDBMS independent code.
I have found a promising C# tool which fully integrates with Visual Studio.NET. I'm going to test it soon (I hope).
Have a look yourself at http://www.xtreme-simplicity.net
I like applications who remember my settings the next time I use it. This is an easy feature which is often forgotten. Most of the time because it is quite some work. With this article I want to help you with this and saving you a lot off work.
Then there is always the question 'where do we store the settings?'. I see a lot of applications using the Registry, ini-files or xml-files. All these solutions are causing a security risk. Especially when you want your application to be downloaded from the web using the 'no touch' deployment features of .NET.
Microsoft has solved this problem for me by introducing an isolated stores. With these stores, you can read and write data that less trusted code cannot access and prevent the exposure of sensitive information that can be saved elsewhere on the file system. Data is stored in compartments that are isolated by the current user and by the assembly in which the code exists.
The downloadable zipfile contains a UserSettingLibrary which can be used to store user settings into an isolated store.
On November 7th, at the OOPSLA Conference in Seattle, WA, C# creator Anders Hejlsberg unveiled several potential language features for the next major release of Visual C# .NET. The four primary features Anders spoke about were:
-
Generics, a form of C++ templates that makes reusing existing code easier
-
Iterators, a construct that makes traversing collections of data significantly faster and easier
-
Anonymous methods, an easier way to perform simple tasks using delegates
-
Partial types, a means for programmers to split code across multiple files
Read more
The System.Windows.Forms.Form class has an AcceptButton property which can be used to set the button on the form that is clicked when the user presses the ENTER key. The accept (default) button should be the button that represents the action that the user is most likely to perform if that action isn't potentially dangerous. This button has a dark border to let the user know that it is the accept button.
This feature works great only when you have one accept button. Have a look at the following diaglog.
The OK button is in this dialog the accept button. This is the correct behavior when the textbox 'Name' and datepicker 'Date' have the focus. There should not be an accept button when the (multiline) textbox 'Description' has the focus. When listbox 'Avialiable' has the focus the '> Add >' button must be the accept button. And when listbox 'Assigned' has the focus the '> Add >' button must be the accept button.
This can be accomplished by implementing the following Enter and Leave event handlers.
I have used the Janus GridEX control in many of my VB6 projects. It worked perfectly and it is very fast.
I have tested the .NET Trial version, it is even better. This is a component that everybody who is building WinForms application should buy.
Have a look at Janus GridEX Control for .NET and try it yourself.
You should write your code in a consistent style. This is easier said then done. The SortCode macro helps you with this by sorting your C# code.
The SortCode macro sorts all members of a type (class or struct) on alphabetical order grouped by their type.
The default order of the types is:
- Events
- Fields
- Enums
- Constructor
- Destructor
- Properties and Functions
- Properties and Functions of implemented interfaces
I find Regular Expression powerful but difficult. Eric Gunnerson wrote the Regular Expression Workbench. This makes them easy.
It's a tool to create, test, and study regular expressions with this workbench. With the "Examine-o-matic" feature, hover over the regex to decode what it means
www.sellsbrothers.com