Walt Ritscher: Thinking about code

Thoughts about .Net - Thoughts about code

  Home :: Contact :: Syndication  :: Login
  171 Posts :: 0 Stories :: 80 Comments :: 23 Trackbacks

Archives

Post Categories

Image Galleries

About Me

Interesting Blogs

My other blogs

Resources

If you are a .NET developer you know about the CLR. That big runtime that hosts our code and manages many of the features we take for granted in .NET. Improvements to the CLR will benefit any .NET application irregardless which language it was written.  I'm sitting in Kit George's CLR session here at the Authors Summit.  Kit is a program manager on the Base Class Libraries team.

Wow.  You are going to like what they've done.  I checked whether his talk is under NDA and it's not - so let me talk about some of the changes in the 2.0 CLR.

Console Applications

Ahhh, the humble console application.  Boring yet simple they certainly have a place in you toolbox.  But what more can you do with them?  Turns out there are a number of things.

Color: Full support for foreColor of text on the console screen

Console.ForegroundColor = ConsoleColor.Red

WindowSize: Change the size of the console window

Console.WindowSize=

WindowPosition:  Move the console windows to new location and the content of the window.

SecureString

The string that you use in your console app is not very secure.  The CLR adds the SecureString type.  The contents of the SecureString are encrypted. Plus the memory location will be 'zeroed out' when the string is dereferenced.  In other words if look in memory dump  you will see either gibberish or zeros.

Hosting the CLR

Starting with .NET 2.0 other applications will be able to host their own copy of the CLR.  The most celebrated application to host the CLR is SQL Server 2005.  There are others too. Would you believe IBM's database DB2?

If you want a really comprehensive overview of Hosting The CLR you should read CBrumme Blog 

The good news for SQL Server is that I can write managed Stored Procedures, Triggers and datatypes.  I can create a managed assembly and invoke methods from it from via standard SQL.

Select Name from Supplier WHERE Location::Distance (@point <3)

In this example Distance is a class and Location is a class member.

Use .NET functions from SQL- for example the String.Split () function is a lot easier to use then the forty line equivalent in T-SQL

More later

 It's time for dinner.  I'll post more later.

 


posted on Wednesday, March 09, 2005 6:04 PM

Feedback

No comments posted yet.
Comments Closed! Due to the spam creeps.
If you want to comment, use the contact page and send me an email and the URL of this Post.
Title  
Name  
Url

Comments   
Enter the code you see: