About 418,000 results
Open links in new tab
  1. c# - Call function from Main () - Stack Overflow

    Apr 10, 2014 · I am new to C# and I'm having a little problem with calling a function from the Main() method. class Program { static void Main(string[] args) { test(); } public void test...

  2. .net - C#: Function in Function possible? - Stack Overflow

    Apr 16, 2020 · This Func is a variable within a function, and the variable itself holds a (reference to a) function. I can then invoke that "private" function within the scope where I've defined it. The Func has access to the other variables that are defined before it, in its execution scope. So, the angle variable is accessible within the angledWidth() function.

  3. c# - Calling JavaScript Function From CodeBehind - Stack Overflow

    Feb 13, 2018 · The key things to note here are the uses of the return keyword in the function call and in the function itself. I've read docs that don't use return but still get the button click to work - somehow it didn't work for me.

  4. Calling a function in the Form Class from another Class, C# .NET

    Dec 29, 2014 · You will have to create a new Form instance and then call it using the instance. If it is static then you can just call it by calling Form1.Method(). Form1 form1 = new Form1(); form1.Method(); I would suggest you move this common method to some other class.

  5. c# - Call a method from another class - Stack Overflow

    Mar 18, 2014 · This way, whenever to your code you can call the CallMethod() like the following: Fooclass.CallMethod() Another apporach it would be to define a static method in your current class, without the class needed to be static, like the following: public class Fooclass { // I don't know the return type of your CallMethod, so I used the void one.

  6. .net - Calling a function from a string in C# - Stack Overflow

    Jan 2, 2024 · Function in C# to call a class/method as in php. 2. Converting two PHP functions to c#. 1. How to call a ...

  7. c# - What's the difference between "call" and "invoke ... - Stack …

    Jan 25, 2016 · Please also note that all of these terms are subjective from the point view of the current code that is being written. Invoking a function via a RPC call is only invoking it from the client's side. From the server's side the request has a different invocation point, if the function even has any "meaning" as a function on the server's side.

  8. How to call any method asynchronously in c# - Stack Overflow

    Apr 6, 2011 · A class implements a method synchronously like the WebClient's DownloadData(…) function for example (1) First wrap the method call in an Anonymous delegate. (2) Use BeginInvoke(…) and send the wrapped anonymous delegate object as the last parameter along with a callback function name as the first parameter.

  9. c# - How to call base.base.method ()? - Stack Overflow

    We had a similar problem in some cases inherited functionality should not execute (or should perform something else). The approach we followed below, was to put the base code that need to be excluded in a separate virtual function. This function can then be overridden in the derived class and the functionality excluded or altered.

  10. c# - Call ASP.NET function from JavaScript - Stack Overflow

    Aug 6, 2008 · <Ajax.AjaxMethod()> _ Public Function Get5() AS Integer Return 5 End Function Then, you can call it on your page as: PageClassName.Get5(javascriptCallbackFunction); The last parameter of your function call must be the javascript callback function that will be executed when the AJAX request is returned.

Refresh