Browse by Tags
All Tags »
C# (
RSS)
Ashic shows a trick that can make overriding more flexible, specially when stubbing for tests. Cross posted from http://www.heartysoft.com/post/2011/03/17/composition-when-overriding.aspx
This article explains why C# 4.0's dynamic features don't seem to work when evaluating instances of anonymous types returned from a public method of a different assembly. Read more... Note: Crossposted from www.heartysoft.com
This is a very simple introduction on using reflection to access the value of a named property on an object using Reflection. Note: Cross posted from Heartysoft.com . Permalink
We frequently see questions about sending emails using .Net in the asp.net forums. The process of sending mail is the same for Windows apps and asp.net websites as the same .Net classes are used. The process can be slightly shortened by specifying default...
When writing a custom HttpHandler, by default you have no access to the Session object. Doing something like HttpContext.Current.Session also returns null. The workaround is quite simple: Reference the System.Web.SessionState namespace: using System.Web...
I just found out something really weird about HTML comments. Apparently, according to standards, you can't do this: <!-- comment ------------------------ --> That is, you can't put two or more ‘-‘s inside a comment. It works as expected in IE7,...
There's a little gotcha with the MemoryStream class that I just found out. It has 7 constructors. The default constructor has the stream set as expandable, with an initial capacity of 0. The ctors that take the capacity set the capacity to the param,...
More Posts