One thing you should consider no matter what type of sensor your using are ways to filter the data to make useful information from it. For both IR and US sensors you can wind up getting lots of ‘noise’ mixed in with good data. Doing a lot of really fancy DSP methods may not work well on a platform like NETMF (that is the reason they have dedicated chip architectures for that sort of stuff.)
There are some simpler things you can do to sort out bogus readings though.
Sample at least twice as fast as you really need the data.
Consider the rate of change (slope) between two data points. For a range sensor it does not make sense for it to read 10cm and then 1000cm if there is no way your device can move that fast.
Look out for outliers: if the range data you expect to get back is between values X and Y then any reading outside that range is nonsense.
Do an easy/fast statistical analysis of the data. You could do a mean, a running average, etc.
I almost forgot: you can download a great book on DSP techniques for free at; http://www.dspguide.com/