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

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.
 
W

William Ryan

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.
 
J

Javier Ros

:D

I found other bug:

((Form)null).Dispose();

throws ArgumentNullException

sorry, it´s a joke ;)
 
M

Mark McKnight

Either there's a bug in .NET or the documentation is incorrect. Read it and
you'll see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top