Sign in
AppDev: Something You Should Know by Irena Kennedy
Everything that is related to application development, and other cool stuff...
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
.NET
Application Development
Async
Config
Deployment
Environment
RIA
Silverlight
SQL
Telerik
TFS
Tools
Visual Studio
VSTS
WCF
Web
Archive
Archives
September 2012
(2)
March 2012
(1)
January 2012
(2)
April 2011
(1)
March 2011
(2)
October 2010
(1)
September 2010
(1)
August 2010
(2)
December 2009
(4)
November 2009
(1)
September 2009
(1)
June 2009
(2)
April 2009
(1)
December 2008
(2)
February 2008
(1)
October 2007
(3)
September 2007
(1)
August 2007
(7)
July 2007
(5)
June 2007
(8)
May 2007
(19)
April 2007
(42)
March 2007
(43)
February 2007
(33)
January 2007
(21)
December 2006
(7)
November 2006
(20)
October 2006
(22)
September 2006
(20)
August 2006
(23)
July 2006
(19)
June 2006
(12)
May 2006
(22)
April 2006
(20)
March 2006
(23)
February 2006
(20)
January 2006
(21)
December 2005
(14)
November 2005
(19)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
AppDev: Something You Should Know by Irena Kennedy
SYSK 115: Do You Know When and How to Use TypeForwardedTo Attribute?
Posted
over 7 years ago
by
irenake
0
Comments
Do you remember the old TreatAs registry setting for COM classes? If you want a quick refresher, check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/html/1d7a1677-738a-4258-9afc-e77bd0dcf40f.asp . Well, TypeForwardedTo...
AppDev: Something You Should Know by Irena Kennedy
SYSK 114: String Interning
Posted
over 7 years ago
by
irenake
2
Comments
What do you think is the value of variable result in the code below: string x = "some string here"; bool result = Object.ReferenceEquals("some string here", x); Given that the data type string is a reference type, it may come as a surprise...
AppDev: Something You Should Know by Irena Kennedy
SYSK 113: System.Convert.ChangeType Undercover
Posted
over 7 years ago
by
irenake
2
Comments
Are you curious about how ChangeType is implemented, and whether it is different from a cast? Then read on… First, what is a cast? C# allows classes and structures to create operators that convert the underlying data type to another type....
AppDev: Something You Should Know by Irena Kennedy
SYSK 112: How to Invoke a Method on the Parent Web Form From a Control
Posted
over 7 years ago
by
irenake
0
Comments
The other day I was asked the question above, and since others might benefit from seeing the answer, and I’m sharing it with SYSK readers below. Question: I've a need to call a method on a WebForm from within the UserControl that lives on that...
AppDev: Something You Should Know by Irena Kennedy
SYSK 111: RoundUp and RoundDown in .NET with Decimal Digits
Posted
over 7 years ago
by
irenake
0
Comments
Excel has two very important functions – CEILING and FLOOR that take in two parameters – number and significance. For example, the CEILING function returns number rounded up to the nearest multiple of significance. For example, if you want to avoid using...
AppDev: Something You Should Know by Irena Kennedy
SYSK 110: Two-Key Dictionary Class
Posted
over 7 years ago
by
irenake
1
Comments
The other day I needed to have a dictionary (i.e. fast search by key) class that works on two keys. This is somewhat akin to a three level tree structure -- first level has elements specified by first key, second level – by second key, and the final third...
AppDev: Something You Should Know by Irena Kennedy
SYSK 109: Is it possible to change the ForeColor of a SubItem in a ListView?
Posted
over 7 years ago
by
irenake
0
Comments
The other day I came across the question above at http://www.codecomments.com/archive293-2004-7-244806.html , which did not provide the way to accomplish the desired effect. The answer is – yes, you can. Here is how you might go above doing it in .NET...
AppDev: Something You Should Know by Irena Kennedy
SYSK 108: What is XPS?
Posted
over 7 years ago
by
irenake
2
Comments
XPS stands for XML Paper Specification – a specification is designed to provide users with a consistent document appearance regardless of where and how the document is viewed, and will be implemented in Windows Vista™. XPS Documents are fixed-format documents...
AppDev: Something You Should Know by Irena Kennedy
SYSK 107: The Difference Between Decimal.ToString(“C”) and Decimal.ToString(“C2”)
Posted
over 7 years ago
by
irenake
1
Comments
Formatting string “C2” explicitly tells to leave two decimals. One could also use “C0” (no decimals), “C1”, “C3”, “C4”. Many believe that there is no difference between the format strings “C” and C2”. While it’s true in the default scenario, it’s only...
AppDev: Something You Should Know by Irena Kennedy
SYSK 106: The Cost of Using WindowsPrincipal
Posted
over 7 years ago
by
irenake
6
Comments
Did you know that using WindowsPrincipal.IsInRole is ~40+% slower than doing the same work yourself? Run the code below and you’ll see … Don’t take me wrong – I do not suggest you avoid using IsInRole call; after all a single call is so fast on most computers...
AppDev: Something You Should Know by Irena Kennedy
SYSK 105: Switching Between Running ASP.NET Project Under IIS and Personal Web Server
Posted
over 7 years ago
by
irenake
0
Comments
As you know, in VS 2005 you can choose “File System” location option when creating an ASP.NET project. Once selected, how do you switch to running your project as a “normal” IIS web site? The solution is simple: Create a virtual directory in IIS...
AppDev: Something You Should Know by Irena Kennedy
SYSK 104: Great Tool for ASP.NET developers
Posted
over 7 years ago
by
irenake
0
Comments
Would you like to view items stored in cache, and remove them for testing purposes? How about being able to view the page's view state (in various forms: raw, parsed, and decoded) to help you optimize your state management logic? Does ability to hide...
AppDev: Something You Should Know by Irena Kennedy
SYSK 103: WriteFile or TransmitFile?
Posted
over 7 years ago
by
irenake
6
Comments
Both, HttpResponse.WriteFile and HttpResponse.TransmitFile (new in 2.0) write the contents of a file to the output stream. However, WriteFile will load the whole file into the memory while TransmitFile won’t. So, if you’ve been using WriteFile, you may...
AppDev: Something You Should Know by Irena Kennedy
SYSK 102: Unexpected Behavior in Generics
Posted
over 7 years ago
by
irenake
4
Comments
Consider the following: static public class MyClass { static public void Method<T>(T x) { . . . MethodX(x); . . . } static private void MethodX(float x) { System.Diagnostics.Debug.WriteLine("Float"); } ...
AppDev: Something You Should Know by Irena Kennedy
SYSK 101: How to Release Build an ASP.NET application
Posted
over 7 years ago
by
irenake
2
Comments
You may have noticed that there is no release build option for web apps. That’s because all compilation settings are now stored in the <compilation> element of your configuration file under <system.web>. Set debug attribute to false for release...
AppDev: Something You Should Know by Irena Kennedy
SYSK 100: Can You Define What Is Web 2.0?
Posted
over 7 years ago
by
irenake
0
Comments
If not, there is a very good explanation at http://en.wikipedia.org/wiki/Web_2.0 . Here are some main points: To some extent Web 2.0 is a buzzword, incorporating whatever is newly popular on the Web (such as tags and podcasts), and its meaning...
AppDev: Something You Should Know by Irena Kennedy
SYSK 99: Is [MTAThread] the Only Solution?
Posted
over 7 years ago
by
irenake
3
Comments
By default, Windows apps (WinForms) are marked with STAThread attribute (see Program.cs). So, if you call System.Threading.WaitHandle.WaitAll passing more than one handle in the array you’ll get an exception “WaitAll for multiple handles on an STA thread...
AppDev: Something You Should Know by Irena Kennedy
SYSK 98: Digging Deeper Into GetHashCode
Posted
over 7 years ago
by
irenake
4
Comments
So, you think you understand when, how and why to override GetHashCode? Then you should be able to answer the following question: will get message box in the code below say “true” or “false”: public class MyClass { private string _param; ...
AppDev: Something You Should Know by Irena Kennedy
SYSK 97: The Power of Environmental Variables
Posted
over 7 years ago
by
irenake
0
Comments
Did you know that if you type %appdata% in Windows Explorer’s address bar, and press Enter, it’ll open C:\Documents and Settings\UserName\Application Data folder? Likewise, by typing %windir%, you’ll get into whatever folder you’ve installed windows ...
AppDev: Something You Should Know by Irena Kennedy
SYSK 96: Macros to Expand and Collapse Regions in VS.NET
Posted
over 7 years ago
by
irenake
0
Comments
Unquestionably, regions make code much cleaner! But they also led to an explosion of method sizes (in number of lines) and the number of methods per file. Long gone is the “rule of thumb” of early 90s of a function size being equal to the visible screen...
Page 1 of 1 (20 items)