I have a method called FormattedJoin()
in a utility class called ArrayUtil
. I tried renaming FormattedJoin()
to just Join()
because it's behavior is similar to .NET's string.Join()
so I figured it made sense to use the same name. However, when I try to use Visual Studio to rename the method, I get this warning:
This member may have compiler generated references
with the same name. Refactoring the member will not
update these references, which may introduce semantic
changes and/or build errors into your code.
I can rename the method just fine and it causes no build errors or compiler warnings. Is it safe to do this or should I avoid having a method with this name?
After seeing this error, I opened up Reflector to see if I could find out if .NET had an internal "ArrayUtil.Join()
" or any variation of that and it doesn't look like it. Even if there was an "ArrayUtil.Join()
" method though, wouldn't having a different namespace make this a non-issue?