Displaying posts tagged with

“.NET”

SourceGrid with Columns Drag and Swap – a grid all C# for .NET 2.0

Last night I discovery SourceGrid is not stopped on .NET 1.1, Davide Icardi version, but it’s maintained by dariusdamalakas (I don’t know if he’s the same guy, I think no), however is a great grid, but there was something missing really important for my project, lucky for me it’s quite simple to do, I need [...]

HowTo RAW Printing C# .NET 2.0 To Network Printer

Sometimes I need to print labels on label printers, .NET 2.0 has a hole in this theme; no way, I have tryed many methods, the only one works well in every configuration is this; only thing that disappont me is you have to use directly Win32 API di do it. Here the code: public void [...]

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 [...]