I don't have the D300, but some things I really like about the 40D are:
1. custom settings on the dial (C1, C2, C3) which retain all parameters and can be used at the flick of a dial - great for switching between landscape, action, panning etc. (I believe the D300 has a menu bank for this rather than on the dial, and the D300 menu bank doesn't retain all settings AFAIK)
2. Live view allowing one press for MLU, live exposure simulation, timed mirror lockup, dof, etc etc - a bit more useful than the D300 version - although the 40D only has normal AF with live view and doesn't include contrast detect AF, it does have a faster fps with the live view. It also allows full operation via laptop with included free Canon software, including interval timed shots.
3. 6.5 fps in 14 bit - comparable to the D300 6 fps in 12 bit or 8fps in 12 bit with the optional grip. (D300 14 bit doesn't seem to be quite as useful, with a small lag time for 14 bit and max 2.5 fps)
The D300 has more buttons and dials which some users prefer. The 40D uses dials and jog wheel and more via menu - I quite like the more streamlined approach of the 40D, less need for two hands; but some prefer the D300 layout.
The D300 is apparently built more solidly, or at least is heavier. I cannot envisage damaging the 40D which is also a solid build, but not in the same league as the heavier 1D series.
The D300 is rated for 150k shutter clicks, the 40D for 100k shutter clicks.
The D300 has 51 AF points, the 40D uses 9. I find the 40D extremely fast and accurate in all AF modes and all light conditions. The 40D has 9 cross-type and the centre point has additional diagonal sensitivity in addition to cross-type sensitivity. I think the D300 has 11 cross type points - but it might be 9, not sure. Don't know if the D300 has a super sensitive centre point.
IQ is probably much the same between the D300 and 40D, with the 40D just slightly edging out the D300 for raw files. But they are so close you likely wouldn't see the difference in real world useage. The D300 native ISO is 200 - 3200. The 40D native ISO is 100 to 1600. Both have extra stops (D300 at 100 ISO equivalent, 40D at 3200 ISO equivalent).
Top lenses plus body with the Nikon will cost quite a bit more than top lenses plus body with the Canon. Some Nikon lenses are better than Canon and vice versa.
Canon has a larger total system. If you see the need for adding FF, pro bodies etc there are more options with Canon. The Canon mount seems to take more lenses via adapters than the Nikon mount allows.
The last two points (cost and total system flexibility) were why I chose Canon in the first place. But I doubt you'd go wrong with either choice these days. I'd suggest picking the lenses you want and then the body that goes with them, unless you have a particular other need.
DISCLAIMER: All the above is subjective and based on using the 40D and only on what I've read about the D300 - so some things might be erroneous and/or not relevant to your needs.
How do the Canon 40D and Nikon D300 cameras compare to each other?Like for example,in what areas is the Canon 40D better than the Nikon D300 and in what areas also is the Nikon D300 better than the Canon 40D?