Bug .NET CF SP1: String.replace() throws exception

  • Thread starter Thread starter Mark McKnight
  • Start date Start date
M

Mark McKnight

Hi All,

I'd like to report a bug in in .NET CF SP1:

s = s.Replace(".", null);

throws ArgumentNullException in .NET CF SP1 (in the device). However, it
should remove the "." from s.
 
It's not a bug. You are trying to replace a part of 'something' with
nothing....

try string.Empty instead of null and it will work.
 
:D

I found other bug:

((Form)null).Dispose();

throws ArgumentNullException

sorry, it´s a joke ;)
 
Either there's a bug in .NET or the documentation is incorrect. Read it and
you'll see.
 
Back
Top