Xperimentality
Building a Better Xperience with .NET
Monday, November 21, 2005
Something new everyday
I just ran across something I guess I have just been missing in playing with the 2.0 framework: The coalescing operator! I love this. Not sure how I have been missing this one. I am a big fan of using something like:
Textbox.Text = (str == null) ? "N/A" : str;
as opposed to using a conditional block. But I just found that I can use:
Textbox.Text = str ?? "N/A";
It is the simple things that make me the happiest! Well, on to finding more things that I have not discovered yet...
.NET
Monday, November 21, 2005 11:50:50 PM (Central Standard Time, UTC-06:00)
Disclaimer
|
Comments [0]
Related posts:
Visual Studio 2008 and .NET 3.5 SP1 Released
ALT.NET Geek Code a Good Reference
Visual Studio 2008 and .NET 3.5 Shipping in November
Upgrade to DasBlog 2.0 on GoDaddy
Visual Studio 2008 and .NET 3.5 Beta 2
Spoke at Developer Training Day in Nashville
Comments are closed.
Who Am I - Todd Miranda
Search
Links
Home
Projects
Book Reviews
NxtDimension Solutions
Softech Development
Community Credit
Birmingham .NET User Group
On this page....
Calendar
<
August 2008
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
Archives
August, 2008 (1)
July, 2008 (2)
June, 2008 (1)
May, 2008 (4)
April, 2008 (1)
March, 2008 (2)
February, 2008 (4)
January, 2008 (2)
November, 2007 (3)
October, 2007 (1)
September, 2007 (1)
August, 2007 (7)
July, 2007 (4)
June, 2007 (5)
May, 2007 (2)
April, 2007 (6)
January, 2007 (4)
December, 2006 (6)
November, 2006 (3)
October, 2006 (9)
September, 2006 (3)
August, 2006 (1)
July, 2006 (1)
June, 2006 (2)
May, 2006 (6)
April, 2006 (18)
March, 2006 (20)
February, 2006 (3)
January, 2006 (3)
December, 2005 (1)
November, 2005 (5)
Aggregate Me!
|
|
Categories
.NET
.NET University
Announcements
ASP.NET
Atlas
Book Reviews
Code Camps
CodePlex Projects
Coding Tips
DasBlog
DotNetNuke
Events
Expression
Firefox
General
General Technology
MIX06
MIX07
MIX08
MVP
Presentations
Silverlight
Silverlight Code Camp Template
Surface
UX
Vista
Visual Studio 2008
Web Development
Webcasts
Windows Presentation Foundation
Wood Turning
Blogroll
Doug Turnure
Jeff Barnes
Joe Healy
Kelly Miranda
Contact me
E-mail
Administration
Sign In