RuntimeBinderException: The best overloaded method match for 'string.Replace(char, char)' has some invalid arguments


Question: How do you resolve the C-Sharp #MVC error that says "#RuntimeBinderException: The best overloaded method match for 'string.Replace(char, char)' has some invalid arguments".


Login to See the Rest of the Answer

Answer: It is most likely that you are trying to replace a String with an Integer. The #Replace function won't work with Integers, it expects the oldValue String to be replaced by the newValue String.

[Notes from Visual Studio Intelisense]: A #String that is equivalent to the current string except that all instances of oldValue are replaced with newValue. If oldValue is not found in the current instance, the method returns the current instance unchanged.

Let me know if this helped you, if it did please leave us a comment below.







For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email Address[email protected]