Browse by Tags
All Tags »
C# (
RSS)
Recently I needed to measure an exact size in memory for a string – asked a developer sitting next to me how would he do it. An answer was: “Take a string’s length multiply by 2(it’s a UTF-8 encoding) – you will get an exact size”. Well this answer was wrong… And the explanation is in a definition of UTF-8 encoding. Here is a quote from Wikipedia : UTF-8 (8- bit UCS / Unicode Transformation Format ) is a variable-length character encoding for Unicode . It is able to represent any character in the...
Wow, it’s so nice from time to time to read a simple post that refreshes our overloaded memory :) Following link reminds us 5 simple attributes, that can be very useful in a development: http://hatim.indexdev.net/2009/12/17/5-very-useful-c-attributes/
For those of you who enjoy playing with brand new Visual Studio 2010 Beta 2 – Training Kit was released, so have fun… Visual Studio 2010 and .NET Framework 4 Training Kit .
Today was published release date of Visual Studio 2010 Beta2 and final release dates. Currently it’s October 21 for Beta 2 and March 22, 2010 for Final Release. http://www.theregister.co.uk/2009/10/19/visual_studio_2010_second_beta_packaging/
Lots of developers are not familiar with the fact that string variables are stored in memory as a plain text and can be stolen with simple memory dump . Therefore they are revealed to anyone who has an access to a server. So all the credit card numbers, passwords, database connection strings etc. are literally exposed when no measures are taken… A simple solution has been always there ... Starting from .NET 2.0 framework there is a SecureString class in System.Security namespace. It’s functionality...
Well TFS is not my specialty, but some time ago I was asked to develop custom control for one of our clients… This process is very easy and intuitive, so it did not took ages, as I thought in the beginning… But I’ve encountered small but very annoying(in UI aspect) problem. After implementing all the needed ( IWorkItemControl interface etc.) and placing my custom control into standard work item, I’ve discovered that opened work item does not indicates that any change was made if changes are...
In my previous post I’ve described how to enable data compression on IIS 6.0 server. The problem I’ve discovered while analyzing HTTP traffic with Fiddler and YSlow is that somehow IIS does not compresses WebResource.axd files. In ASP.NET websites with extensive use of Ajax this issue reduces site’s performance significantly, because of size and amount of axd files in use. Screenshots below demonstrate results of enabling of IIS standard data compression during my tests( here can be found some explanations...