About 2,730,000 results
Open links in new tab
  1. Functions - The complete C# tutorial

    Functions. A function allows you to encapsulate a piece of code and call it from other parts of your code. You may very soon run into a situation where you need to repeat a piece of code, from …

  2. Functions in C# with Examples - Dot Net Tutorials

    As part of this article, you will understand what methods are and their type and how to create and call functions in C# with Examples. What are the Functions of C# Language? A function is a …

  3. C# Syntax - W3Schools

    Every line of code that runs in C# must be inside a class. In our example, we named the class Program. System, namespace and class works. Just think of it as something that (almost) …

  4. C# Functions / Methods Tutorial With Code Examples - Software …

    Apr 1, 2025 · In C#, functions have the following syntax: <Access Specifiers> <return type> <name of the function>(< function parameters>) { <function code> return; } As we discussed in …

  5. C# Functions - C# Tutorial

    By definition, a function is a reusable named block of code that does one task. For example, the following defines the SayHi() function that outputs the "Hi" message to the console: …

  6. Local functions - C# | Microsoft Learn

    Nov 22, 2024 · Local functions are methods of a type that are nested in another member. They can only be called from their containing member. Local functions can be declared in and called …

  7. Functions in C# | Learn X By Example

    Functions are central in C#. We’ll learn about functions with a few different examples. using System; class Program { // Here's a function that takes two ints and returns // their sum as an …

  8. C# Functions Tutorial - KoderHQ

    We cover how to define and use (call) functions, how to add parameters and return values from a function as well as how to pass parameters by reference and out parameters. Learn how to …

  9. Defining and Using Methods (Functions) in C#: A Comprehensive …

    Learn the fundamentals of defining and using methods (functions) in C#. This tutorial covers method syntax, parameters, return types, access modifiers, and best practices for writing …

  10. Understanding Functions in C# Programming - Web Dev Tutor

    In C#, a function is defined using the function keyword followed by the return type, function name, parameters (if any), and the function body enclosed in curly braces. Here is an example of a …

Refresh