I want some Moore

Blog about stuff and things and stuff. Mostly about SQL server and .Net
posts - 218, comments - 2281, trackbacks - 33

My Links

Advertisement

News

Hi! My name is 
Mladen Prajdić  I'm from Slovenia and I'm currently working as a .Net (C#) and SQL Server developer.

I also speak at local user group meetings and conferences like SQLBits and NT Conference
Welcome to my blog.
SQL Server MVP

My Books

SQL Server MVP Deep Dives 2
The Red Gate Guide to SQL Server Team based Development Free e-book

My Blog Feed via Email
Follow MladenPrajdic on Twitter


Users Online: who's online

Article Categories

Archives

Post Categories

Cool software

Other Blogs

Other stuff

SQL stuff

March 2006 Blog Posts

C# 2.0 ?? Operator

I saw this operator in use today in a code example. I must say when I figured what it does my geek side went "YES!!!!". It resembles an old "if" abbreviation: (condition ? true result : false result); now what ?? does is a null check same as the SQL Servers Coalesce function. It returns the first non null parameter. function test(class1 variable) { if (variable == null) variable = new class1(); // equals to variable = (variable ?? new class1()); } I'm starting to use this and giving a "What!?!???" moment...

posted @ Monday, March 27, 2006 12:35 PM | Feedback (6) | Filed Under [ .Net ]

Reverse string in C# and bitwise XOR

why is there no reverse string function in c#?? Is there realy no need for that function?? there are of course a few ways to make your own reverse function. most favorite is definitly the one using recursion with substring. that's preety cool i thought why not... and then i remembered something that i learned in my first year of college... bitwise operations. i knew that there was a handy little way of switching 2 values using something with XOR without using a 3rd variable. i just couldn't remember it... so i went googling... it sure was faster than going through...

posted @ Sunday, March 19, 2006 6:04 PM | Feedback (51) | Filed Under [ .Net ]

Powered by:
Powered By Subtext Powered By ASP.NET