Update function signature

  • Thread starter Thread starter omtechguy
  • Start date Start date
O

omtechguy

Hi,

I found that when i try to use function that doesn't exist, VS allow
me to generate the function (including the parameters) and all i need
to do it to impelement the body of the function.

Is there a quick way to add a parameter to the function instead of
adding it manually?

Thanks.
 
Perhaps you should try to express your question in a clearer way.

You already seem to understand that if you type an argument in the method
call site, the auto-implement feature will include that argument as a
parameter for the method when it's auto-implemented.

For example, if you type this in:

  bool f = SomeNewMethod("foo");

...and then have VS auto-implement the method "SomeNewMethod", you get
something like this:

  bool SomeNewMethod(string p)
  {
    throw new NotImplementedException();
  }

What else do you want?

Pete

He wants to do something like this:

given a method Foo:

public Foo(string s) {};

he then wishes to change it:

public Foo(int i, string s) {}

and have the system update. This can be done, of course, refactoring
is easy. But what is "i" across
the system?

Matt
 
He wants to do something like this:

given a method Foo:

public Foo(string s) {};

he then wishes to change it:

public Foo(int i, string s) {}

and have the system update. This can be done, of course, refactoring
is easy. But what is "i" across
the system?

Just change the method and fix all the build errors
one by one.

:-)

Arne
 
Back
Top