.Net and C# - Ed's Blog
in

dotnet.org.za

South African .NET Developer Portal

Ed's Blog

Object reference not set to an instance of an object

Browse by Tags

All Tags » .Net and C# (RSS)
  • Extensive examination of data structures in C# 2.0

    There is a nice series of articles on data structures using C# 2.0 (uncluding all the stuff around generics) on MSDN. The articles really go into great detail about how arrays etc. physically work in memory. Very nice if you've got some time between 2:00 and 3:00 in the morning. [PS: I was a bit undecided as to wether to post this or not, thinking that this sort of stuff was more or less common knowledge but then I rememebered an incident the other day when a colleage (not junior by the way) asked...
    Posted Feb 17 2005, 08:03 AM by eduard with | with 3 comment(s)
    Filed under:
  • nHibernate Query Analyzer

    Armand pointed me to this tool. It's SWEET, once you get it going. Thanks dude! [Read more here ] Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Feb 10 2005, 03:02 PM by eduard with | with no comments
    Filed under: ,
  • Indigo "hello world"

    Clemens Vasters writes a quick post that shows som Indigo code, for someone who hasn't really looked into Indigo, it's a nice quick and dirty, just to see some code. Seems like they've done a lot to abstract all the concepts and I presume you'll be able to expose your services via remoting, message queueing etc. as well. Great stuff. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Feb 10 2005, 08:22 AM by eduard with | with 1 comment(s)
    Filed under:
  • Retrieving the MIME type of a given extension

    I've had to this often on my programming escapades. Usually I created some sort of in memory lookup table, but this time I thought there had to be a better way and it turns out there is. All the MIME types and file extensions are stored in the registry. So all you have to do is loop through the MIME types and search for the extension you're looking for. Probably not the most high performance solution, but I could not notice the difference between this and the old code. Here is some code: public static...
    Posted Feb 03 2005, 11:05 AM by eduard with | with 7 comment(s)
    Filed under:
  • The place of SOA and webservices

    It is almost with a heavy heart that I take up this subject again, simply because I seem to be outnumbered in my opinion that SOA and webservices are overhyped and are used in places where Object Orientation and other technologies are more appropriate. But still I simply can't help myself to say what I have to say, so here goes: It feels as if it's politicaly incorrect these days to say anything bad about webservices. My main problem is that it is being punted, especially by Microsoft, as the answer...
    Posted Feb 01 2005, 08:47 AM by eduard with | with 1 comment(s)
    Filed under:
  • Enterprise Library released

    The next generation of the Microsoft Application Blocks has been released. It is now called the Enterprise Library. Get is here . Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Jan 31 2005, 11:51 AM by eduard with | with 1 comment(s)
    Filed under: ,
  • nHibernate proxies for lazy loading

    nHibernate has always used lazy loading for collections (one-to-many and many-to-many relationships) but you can now use lazy loading for one-to-one and many-to-one relationships (from v0.6.0.0). For example, let's say you map a Department/Proffesor relationship where the Department class will have a collection of Proffesor objects and the Proffesor class will have a Department property which returns a Department instance. In previous versions of nHibernate, when you load a Proffesor object, it's...
    Posted Jan 25 2005, 12:14 PM by eduard with | with 2 comment(s)
    Filed under:
  • Authenticating Active Directory user in .NET

    I've not needed to do this before but it seems to be quite trivial once your connected to the LDAP server. There's a short example here . Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Jan 17 2005, 10:43 AM by eduard with | with no comments
    Filed under:
  • That other Access Denied error - the one with - add assembly="*" - PART 2

    In a previous post I gave a solution for this error (an example error message can also be found in the post). Recently I came across the error again and this time the fix in my previous post did not solve the problem. In fact, the dll's in the temporary folders that the error message said was locked, did not even exist. It turned out that the server administrator had been playing around with the access rights on the website and that the ASPNET account no longer had any permissions on the bin folder...
    Posted Jan 13 2005, 08:43 AM by eduard with | with 3 comment(s)
    Filed under:
  • Application trust boundries

    Rocky Lhotka writes an interesting article on the “Fallacy of the data layer”. Although he focusses on the data layer, the mayor points I take away from are the following: your application has a trust boundry, anything that you have full control over falls inside that boundry, and anything you don't have full control over falls outside the boundry. So what ? you may ask. The key concept is that once you cross the trust boundry, the code you're going to should be properly encapsulated...
    Posted Dec 17 2004, 12:14 PM by eduard with | with no comments
    Filed under:
  • C# command line compiler

    For the notepad junkies I found this nice article on how to do almost anything with the c# 2.0 commandline compiler Read it here Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Dec 14 2004, 09:25 AM by eduard with | with no comments
    Filed under:
  • Boxing/unboxing types in .NET

    Sometimes your code does stuff without you knowing it (that tends to happen a lot to me :) ). One such a thing is the boxing and unboxing of types, which is basically conversion between primative data types (such as int) and it's object representation(Int32). I recon it's a good to know what happens behind the scenes and when it happens. Read more about it here Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Dec 08 2004, 08:55 AM by eduard with | with 5 comment(s)
    Filed under:
  • Data-Binding to Web Service Proxies

    I had to do this today(bind an array of objects returned by a web service) and it turns out that the a datagrid can't bind to public fields on objects. It only binds to public properties. That's fine with me, except that the wsdl.exe utility that generates web service proxies, converts all the properties of the object that is returned by the web service, to public fields in proxy object. There is no aparent way to tell it to do something different. Then I found this post by Brian Ritchie. He basically...
    Posted Nov 30 2004, 01:37 PM by eduard with | with 3 comment(s)
    Filed under:
  • Default Button control - very nice

    The .Text guy, Scott Watermasysk, create a textbox control where you can set the button that must be click if the person hits enter while the textbox has focus. I recon it's very nice. We had quite a big issue putting the same behaviour in an existing system, this would have helped a lot. Get it here Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
    Posted Nov 25 2004, 08:11 AM by eduard with | with 2 comment(s)
    Filed under:
  • Stored procedures are bad, m'kay?

    Frans Bouma sets out his arguments for why inline sql is just as good, and better than using storeprocs for data access. I must say that I agree with him. I'm currently busy creating 2 application frameworks for an upcoming project, one uses nHibernate (which generates sql on the fly) and one that uses storeprocs. The amount of extra code, work and maintenance that goes into the storeproc framework is staggering ! I also understand that Axapta also does not use storeprocs for data access, can it...
    Posted Nov 24 2004, 12:43 PM by eduard with | with 6 comment(s)
    Filed under:
More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems