[VS2010 Tips] Multi-line Insertion

While reading the MSDN article on converting VBA applications to C# 4.0, I remembered the famous ALT+[Selection] function that allows you to insert the same text/code on multiple lines at once. So, here is the English version of that part of the article:

Press ALT and select where you want to insert your code (selection in light blue in the image below):
image
Type your code and boom! All the selected lines have been filled with your code:

[Read More]
Categories: .NET  C#  Tools  Tags: VBA  MSDN  VS2010  Tips  Visual Studio 2010  C# 

Unveiling Microsoft LightSwitch

Microsoft has just unveiled LightSwitch, a tool for developing business applications without having to touch the code. Jason Zander provides an excellent introduction on his site.

There will be a template for C# and VB. At first glance, the generated application seems to run on WPF for the Desktop version, and probably Silverlight or XBAP for the web version.

The beta will be available on August 23rd.

Stay tuned

How to Create Your StyleCop Rules

StyleCop is a free tool from Microsoft that allows you to check the style of your code (or others’). Additionally, StyleCop is now available as Open Source (on Codeplex), so I strongly recommend looking at the default rule implementations to help you create your own.

Create Your Rules

Here are some steps to create your custom StyleCop rules:

  • Install the latest version of StyleCop
  • Download the SDK of StyleCop (documentation .chm file)
  • Start Visual Studio
  • Create a new project of type “Class Library”
  • Add the following references - Microsoft.StyleCop - Microsoft.StyleCop.CSharp - Microsoft.StyleCop.CSharp.Rules

StyleCop_SolutionExplorer

[Read More]
Categories: .NET  Tools  Tags: .NET  C#  CodePlex  Microsoft  Visual Studio  VS2010  StyleCop  Rules 

Multimedia File Metadata

While retrieving a list of multimedia files, I ended up with a list of files with 4-character names that meant nothing. Grrr…. So I decided to create a small utility to rename the files according to a pattern I already had on my machine based on the artist, album, and song title.

But a problem quickly arose: How to retrieve this metadata (mainly from MP3 files)?

So I did what I often do when I have a question, I did a little search. And I found on this StackOverflow result a link to TagLib# (also working on Mono)! This library from Novell does all the work for me! It allows me to access metadata for many different types of files. Here is the basic example among several provided on their site:

[Read More]
Categories: .NET  C#  Tags: .NET  C#  StackOverFlow  TagLib#  Novell  MP3  multimedia  Mono 

Observable Collection Monitoring Item Changes

I encountered a situation while developing a WPF application that used the ObservableCollection class. Here is the description:

Problem:

A collection of items that contains several items (which themselves implement the INotifyPropertyChanged interface). I need to perform certain calculations: total items to be completed, total completed items, remaining items, etc. But when one of these items changed status and became completed, it was impossible to push the information (push) to a higher level.

[Read More]

PRISM and Telerik RadControls for WPF

For some time now, I have had the chance to experiment with PRISM and I really like what it brings to the table. But I also use some Telerik controls for WPF, and after doing some research, I noticed that Telerik has included in its documentation some elements about PRISM.

Here are some interesting links:

If you have other interesting articles, let me know via the comments or my contact page

[Read More]
Categories: .NET  C#  WPF  Tools  Tags: .NET  CodePlex  Visual Studio 2010  Prism  Telerik  WPF  MVVM  C# 

The TextFieldParser

Éric Moreau wrote an article about an interesting component that I didn’t know about (available since 2.0): the TextFieldParser. It provides methods and objects for parsing structured text files (i.e. .CSV).

Unfortunately, Microsoft included it in the Microsoft.VisualBasic.dll extension. Even though you can add this extension in C#, it is not really specific to VB.

Happy reading