Displaying posts filed under

.NET 2.0

When you can use Conditional If Expression aka Single Line If Statement in .NET C#

… and the real name is ternary operator [thks pdh]… I hope you know this way to write an if statement: condition ? expression : expression In .NET (hem and only c#) you can you this only as right operand such as: a = (b > 50) ? 1 : 100; you cannot use ?: [...]

Enable or Disable Visual Studio Hosting Process?

Well, I work every day with Visual Studio and main current project I’m working on is a solution with eight projects, winexe and libs. Microsoft says that Visual Studio Hosting Process (projectname.vshost.exe in your task list) give you this improvements: 1. Improved Performance Bah, doing what? I have six unuseful process eating cpu, memory and [...]

How to Get User Name, Domain Name, Computer Name in .NET

.Net has a nice support for these things, examples are in C# but VB Net translation is obvious, let’s see it: User Name The simplest way to retrieve username in .NET is to use System.Environment namespace: string sUserName; sUserName = System.Environment.UserName(); Note that user name retrieved is the user that launch process. Domain Name Again [...]

Split a DataSet DataTable into more DataTables

for – To split a DataTable into more DataTables you need to process table rows with a loop, you know how many rows you have, so for loop is the choice. Clone – The fastest method to create tables with original columns structure is Clone method. ImportRow – In order to preserve rows states while [...]

Definitive .NET Obfuscation Solution: Eazfuscator

I’m using this free obfuscator (Eazfuscator) from an year with tons of lines of code, with also .NET Compact Framework code, it’s great. And most important thing I see in this obfuscator is that you don’t have to think about it! Download and Install Open Eazfuscator GUI From Visual Studio (all versions), drag project folder [...]