Archive

Posts Tagged ‘Visual Studio’

New (at least for me) IO functions.

June 30th, 2009 Paul No comments

embarrassing

Well, live and learn. This was an interesting day. I am working on a little project right now, can’t really discuss details, and quite frankly it is nothing that I am going to be too proud of once it is done. But this is not the point. I had to do some minor IO work with this and this is when I found that instead of doing stuff like:

  |  copy code |? 
01
02
 
03
_fsCFileStream = new FileStream(sFileName, FileMode.Open, System.IO.FileAccess.Read);
04
_srStreamReader = new StreamReader(_fsCfMCCSV, Encoding.GetEncoding(1252));
05
 
06
try
07
{
08
    if ((sLineIn = _srCfMCCSV.ReadLine()) == null)
09
        //do stuff here
10
}catch(){}
11

I can simply do
  |  copy code |? 
1
2
File.ReadAllLines();
3

I guess I was stuck on .Net 1.3 for so long, I completely skipped 2.x and now 3.5 is full of surprises. I know I am behind times, need to catch up soon. Gone to do some reading.

Categories: Coding Tags: , , ,

Keyboard shortcuts Visual Studio 2008

January 26th, 2009 Paul No comments

1003082_60642695

When it comes to development, IDE is an important part of the process. Some people still use some sort of a text editor to do all their coding, and I applaud them for it. I on the other hand am not a big proponent of typing out all your namespaces / commands / functions, nor am I capable of memorizing all the functions that are available in a language, so I use IDE. Since I am coding C# mostly, I am using Visual Studio. I have to admit – I love Visual Studio, especially with ReSharper (I don’t work for JetBrains, I just simply love this tool) added to the mix. I also have to say for the last 5 years I have not been using desktop to do my coding. I am addicted to laptops, and my boss have been kind enough to always providing me the newest and most powerful laptop budget can allow. This is why I love the idea of not using your mouse, after all, Visual Studio does come with a great deal of keyboard shortcuts, so why not use it? Read more…