About 7,490,000 results
Open links in new tab
  1. c# - What does the `%` (percent) operator mean? - Stack Overflow

    Oct 2, 2024 · If x and y are non-integer values x % y is computed as x – n * y, where n is the largest possible integer that is less than or equal to x / y (more details in the C# 4.0 …

  2. 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; . I write C# to climb to abstraction levels above …

  3. What does the '=>' syntax in C# mean? - Stack Overflow

    Nov 14, 2008 · From C# 3 to C# 5, this was only used for lambda expressions. These are basically a shorter form of the anonymous methods introduced in C# 2, but can also be …

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

    Aug 12, 2008 · The sample below is a little long because I am showing you both the custom version and the flags enum. If you remove the flags enum and the associated functions in the …

  5. c# - Operator overloading ==, !=, Equals - Stack Overflow

    Aug 23, 2014 · I've already gone through question I understand that, it is necessary to implement ==, != and Equals(). public class BOX { double height, length, breadth; // this is first one '==' ...

  6. 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 …

  7. What does the @ symbol before a variable name mean in C#?

    Mar 18, 2016 · I understand that the @ symbol can be used before a string literal to change how the compiler parses the string. But what does it mean when a variable name is prefixed with …

  8. c# - Using variables inside strings - Stack Overflow

    6 Up to C#5 (-VS2013) you have to call a function/method for it. Either a "normal" function such as String.Format or an overload of the + operator.

  9. c# - Get dictionary key by value - Stack Overflow

    You could do that: By looping through all the KeyValuePair<TKey, TValue> 's in the dictionary (which will be a sizable performance hit if you have a number of entries in the dictionary) Use …

  10. c# - System.Configuration App.config file with .NET 8.0 - Stack …

    May 31, 2024 · I have an old library that used .NET 4.7.2. It uses System.Configuration and an app.config file. I migrated the library to target framework of .NET Standard 2.0. My unit tests, I …