Browse by Tags

C# Trivia Question Series
Published 08-02-2007 11:16 PM | jokiz
Some of you know about the C# trivia series that I started in MSForum's C# section . Good thing some of these posts were revived since they were missing months ago. Here are the links: Trivia #1 - Arraylist's initial size Trivia #2 - String concatenations...
Filed under: , ,
Resharper's GetHashCode() and the number 29
Published 07-16-2007 5:30 PM | jokiz
I blogged last year last year about Overriding Equals and GetHashCode . You provide an Equals override if you want to provide value equality on your business objects and normally, you'd use the logical key fields (DB lingo) for comparison. GetHashCode...
Filed under: , ,
log4net is not logging!
Published 07-05-2007 3:32 PM | jokiz
I have been using log4net for a year and a half now and there are scenarios where I'm expecting it to log some data only to find out that it's not logging. I know two possible reasons of log4net not logging: 1. It is not yet configured to log...
HashTable and Dictionary Difference
Published 07-04-2007 5:59 PM | jokiz
So far, I have been using just two classes of the System.Collections.Generic namespace, List<T> and Dictionary<K,T>. At first I thought that Hashtable and Dictionary<string, T> are of the same fruit, the difference is the eliminated...
Filed under:
A data item was not found in the container. The container must either implement IDataItemContainer, or have a property named DataItem.
Published 07-04-2007 2:44 PM | jokiz
I'm working on a GridView and I'm databinding a List<BusinessObject> to it. All is well until I tweaked some code and suddenly, I got this System.Web.HttpException with message A data item was not found in the container. The container must...
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Published 06-28-2007 6:14 PM | jokiz
I was running a test today which uses NHibernate to load data from the database and I got this result. The inner exception details are below: Inner Exception System.TypeInitializationException Message: The type initializer for 'NHibernate.Cfg.Configuration'...
Filed under: , ,
Analyze your code with NDepend
Published 06-07-2007 11:28 AM | jokiz
I first heard about NDepend months ago from Scott Hanselman through one of his podcast . I had the chance to evaluate a professional edition of the tool so here are my insights. Here is a screenshot of one of our current projects loaded in NDepend. NDepend's...
Filed under: , ,
Resharper 3.0 Beta is out
Published 05-31-2007 10:24 AM | jokiz
Jetbrains has just released their beta version of Resharper 3.0, download it here . Again, VB.NET guys out there, you should try Resharper since it now supports your language. Resharper 3.0 will now come into three versions (C#, VB and Full edition)....
System.BadImageFormatException: The format of the file <filename> is invalid
Published 04-17-2007 11:08 AM | jokiz
I was trying to install a .NET executable as a windows service using installutil.exe yesterday and i got this message. It was the first time that i encounter such exception when installing a windows service. Turned out that the environment path for my...
Filed under:
subclassing generics
Published 03-20-2007 5:39 PM | jokiz
I saw my teammate months ago using a hashtable in creating a lookup type of business objects. Since we have just started using .NET 2.0, i told him about the new feature that comes with it that can be useful in his current task, generics . I told him...
Filed under:
Reflector tips
Published 02-21-2007 9:48 AM | jokiz
Here are some tips on using Lutz Roeder's Reflector that some of you might not yet know. Enclose search parameters with quotes for exact match. Use AssemblyList for sets of assemblies (I currently have .NET 1.1, .NET 2.0, CSLA 1.1, CSLA 2.0, NHibernate...
Filed under: ,
Learning VSTO
Published 12-07-2006 5:14 PM | jokiz
We've just upgraded to Visual Studio 2005 (finally!) and I'm currently exploring Visual Studio Tools for Office for my next project. It's my first time to use it and i have seen it used in one of the events through MS Philippines. The project's specification...
Filed under: , ,
Singleton usage
Published 11-24-2006 7:52 PM | jokiz
We currently have a Singleton class in our application which in the next phase of development will change to a multi-instance. The problem is every class which makes use of it accesses it directly through the exposed static interface. I believe this is...
Filed under: ,
ControlInspector for Windows Forms
Published 10-09-2006 6:51 PM | jokiz
I used to use this ConstrolInspector utility from CodeProject utility to know the sequences of events for a control back when i was still a component developer. OT: An ex-officemate of mine, still with my previous employer asked me about this utility...
Filed under: , ,
Decimal values cannot be used in Attributes
Published 10-06-2006 11:35 AM | jokiz
One of the things I like with MbUnit is the parameterized test methods with RowTestAttribute . This gives you the ability to write just a single test case to test a method with parameters. As I was coding my formula parser i bumped into a limitation on...
Filed under: ,
More Posts Next page »