About 50 results
Open links in new tab
  1. What is the difference between i++ and ++i in C#?

    Jul 27, 2010 · C# is not assembler, and out of 99.9% of the times i++ or ++i are used in code, the things going on in the background are just that; in the background. I write C# to climb to abstraction levels …

  2. c# - What does the => operator mean in a property or method?

    See this post Difference between Property and Field in C# 3.0+ on the difference between a field and a property getter in C#. Update: Note that expression-bodied members were expanded to include …

  3. How does the or-assignment operator (|=) work? (C#)

    Apr 26, 2016 · and it still worked. While I would guess that e.Cancel is determined based upon the evaluation of MessageBox.Show(...) == MessageBoxResult.No, I don't know why the |= operator is …

  4. c# - What does the `%` (percent) operator mean? - Stack Overflow

    Oct 2, 2024 · Sample output: 1 -1 0.6 0.6 -1.2 Note that the result of the % operator is equal to x – (x / y) * y and that if y is zero, a DivideByZeroException is thrown. If x and y are non-integer values x % y is …

  5. c# - What's does the dollar sign ($"string") do? - Stack Overflow

    C# string interpolation is a method of concatenating,formatting and manipulating strings. This feature was introduced in C# 6.0. Using string interpolation, we can use objects and expressions as a part of …

  6. What does the [Flags] Enum Attribute mean in C#?

    Aug 12, 2008 · Also, C# does not require Flags per se. But the ToString implementation of your enum uses Flags, and so does Enum.IsDefined, Enum.Parse, etc. Try to remove Flags and look at the …

  7. What is the difference between & and && operators in C#

    Nov 12, 2010 · I am trying to understand the difference between & and &&operators in C#. I searched on the internet without success. Can somebody please explain with an example?

  8. What does `array[^1]` mean in C# compiler? - Stack Overflow

    Oct 26, 2020 · How does index of ^1 returns the last item in an array? What does ^1 mean in C# compiler? Does it have performance benefit vs numbers[numbers.Count()-1]?

  9. c# - ?: ?? Operators Instead Of IF|ELSE - Stack Overflow

    Operator (C# Reference) The ?? operator is called the null-coalescing operator and is used to define a default value for a nullable value types as well as reference types.

  10. c# - Send HTTP POST request in .NET - Stack Overflow

    Here's what I use in .NET 4.8 to make an HTTP POST request. With this code, one can send multiple POST requests at a time asynchronously. At the end of each request an event is raised. And also at …