If I implement an abstract class that contains this method:

    private void MyMethod(string awesomeParameter, int aBigNumber)
    {
        // something cool happens here!
        throw new NotImplementedException();
    }

can I change it to this without breaking the implementation?

private void MyMethod(string myParam, int myInt)
{
    // something cool happens here!
    throw new NotImplementedException();
}

I can't seem to find an answer to this, and I've never run into this issue before, but I'm implementing a new MembershipProvider and the default implementation uses some logical parameter names, but they don't match our sql table schema. For example, the implementation uses "username" but our table's column is "UserID." It would be easier to read through the code if the names matched the schema we are using.

Recommended Answers

All 3 Replies

Have you tried it? Parameter names for private methods shouldn't really matter. I tried to locate it on MSDN, but haven't found it yet.

I haven't tried it no. The MembershipProvider class has quite a few methods and I can't really test it.

I guess actually I could try with just a generic class of my own. I was hoping someone here might know so I didn't have to spend time writing a abstract class, implementing it and testing it to see if it worked.

I'm just leaving them as is for now. I doubt the parameter names matter really, the signature is the same and is probably all that matters.

After I implement the entire provider I might try switching a parameter name and seeing what happens. But for now, I'll deal with the mismatched names...I guess that's what documentation is for eh? :P

You could use a small test project with a class with just the method involved.
Don't think it really matters though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.