About 1,430,000 results
Open links in new tab
  1. c# - How to easily initialize a list of Tuples? - Stack Overflow

    C# 7 will be adding in support for tuples built into the language, though they will be of a different type (System.ValueTuple instead). So to it would be good to add overloads for value tuples so you have …

  2. c# - How to name tuple properties? - Stack Overflow

    How and "could be" organized return from the method which returns tuple type with the name of parameters, as an example private static Tuple<string, string> methodTuple() { return new {N...

  3. c# - How to create an array of tuples? - Stack Overflow

    Tuple <int,int>from = new Tuple<int,int>(50,350); Tuple <int,int>to = new Tuple<int,int>(50,650); where each tuple is a coordinate pair. I am trying to create an array of multiple coordinate pairs using …

  4. c# - What's the difference between System.ValueTuple and …

    The difference between Tuple and ValueTuple is that Tuple is a reference type and ValueTuple is a value type. The latter is desirable because changes to the language in C# 7 have tuples being used …

  5. c# - Return multiple values to a method caller - Stack Overflow

    @Jakob isn't out the closest thing C# has to native multiple return? The tuple probably is the best option for readability. Personally, I'm not keen on having anonymous types or property names like Item1 - …

  6. When is it better to use a Tuple versus a KeyValuePair?

    Here's a benchmark I found online: Tuple vs. KeyValuePair. The only problem with this benchmark is that they tested KeyValuePair<string, string> vs. Tuple<string, string>, and the string type is an …

  7. datetime - How to return named tuples in C#? - Stack Overflow

    How to return named tuples in C#? Asked 7 years, 4 months ago Modified 3 years, 3 months ago Viewed 58k times

  8. c# - Returning two values, Tuple vs 'out' vs 'struct' - Stack Overflow

    46 Adding to the previous answers, C# 7 brings value type tuples, unlike System.Tuple that is a reference type and also offer improved semantics. You can still leave them unnamed and use the …

  9. c# - Possible to initialize multiple variables from a tuple? - Stack ...

    Possible to initialize multiple variables from a tuple? Asked 11 years, 11 months ago Modified 6 years, 11 months ago Viewed 17k times

  10. c# - return tuple result in async method .net core - Stack Overflow

    I have an async method. This method get list of 10 row from database and getting total count of query result. Because I'm using for grid pagination. So, I'm using tuple which one element is List and