Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does "generate method stub" mean in c#?

I'm trying to call a function, and VS gives me an error (red underline), and i have the option to "generate method stub". What is this?

like image 207
jello Avatar asked Feb 23 '10 08:02

jello


People also ask

What is a method stub c#?

A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code (such as a procedure on a remote machine; such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code.

What is a method stub in Java example?

A method stub, likely referring to a method signature, is comprised of an access type, return type, other keywords, the method name, and its parameters. For example, the method stub for the main method is: public static void main(String[])


2 Answers

The generate method stub will generate you a method which looks exactly like you've written it, with the same parameters. Probably are getting this error because you've misspelled the method or because it is in a different namespace.

like image 184
Stefanvds Avatar answered Sep 28 '22 01:09

Stefanvds


It means that you're trying to call the function incorrectly; check to make sure you've spelled the method name correctly, and that you're passing it the proper number and types of arguments.

like image 28
Adam Maras Avatar answered Sep 28 '22 02:09

Adam Maras