Reflection IT Blog

Benieuwd naar de laatste ontwikkelingen rondom software ontwikkeling en Reflection IT? Onze slimme koppen delen regelmatig hun kennis en ervaring. Zo weet jij wat er speelt!

visual studio tagged Blog posts

Free VS.NET Add-In: Spelly.NET

01-Apr-2003

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.

SQL-strings considered harmful

10-Mar-2003

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.

Save your UserSettings in an Isolated Store

01-Feb-2003

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.

NEW C# LANGUAGE FEATURES

10-Jan-2003

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

WinForms AcceptButton Extender

01-Dec-2002

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.

 

C# SortCode Macro for Visual Studio.NET 2003

01-Oct-2002

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

Get in touch

Met dit formulier kunt u informatie over een In-Company of Small-Group training aanvragen. U kunt in het bericht aangeven welke training u wilt, voor hoeveel personen, wanneer deze verzorgd moet worden en op welke locatie. Wij nemen vervolgens contact met u op.

U kunt ons ook bereiken via telefoonnummer +31 (0)493-688810 of per mail training@reflectionit.nl.