About 20,600,000 results
Open links in new tab
  1. Quick way to create a list of values in C#? - Stack Overflow

    I'm looking for a quick way to create a list of values in C#. In Java I frequently use the snippet below:

  2. .net - Creating a List of Lists in C# - Stack Overflow

    Feb 25, 2015 · Edit: Adding information Would declaring a List<List<T>> be considered legal here? In case you are wondering, I am building a class that allows me to use a ulong as the …

  3. Define a List of Objects in C# - Stack Overflow

    Define a List of Objects in C# Asked 11 years ago Modified 4 years, 1 month ago Viewed 133k times

  4. c# - How can I find a specific element in a List<T>? - Stack Overflow

    The example above works, because in C# an assignment can be used as an expression or as a statement. The value of an assignment expression is the assigned value where the …

  5. Most efficient way to find if a value exists within a C# List

    Apr 17, 2013 · In C# if I have a List of type bool. What is the fastest way to determine if the list contains a true value? I don’t need to know how many or where the true value is. I just need to …

  6. How can I initialize a C# List in the same line I declare it ...

    Dec 14, 2010 · 7 Posting this answer for folks wanting to initialize list with POCOs and also coz this is the first thing that pops up in search but all answers only for list of type string. You can …

  7. c# - Find an item in a list by LINQ - Stack Overflow

    string search = "lookforme"; List<string> myList = new List<string>(); string result = myList.Single(s => s == search); Note that SingleOrDefault() will behave the same, except it …

  8. c# - Getting a list item by index - Stack Overflow

    I've recently started using c# moving over from Java. I can't seem to find how to get a list item by index. In java to get the first item of the list it would be: list1.get (0); What is the equival...

  9. c# - How to initialize a list with constructor? - Stack Overflow

    Feb 1, 2012 · Please guide me is among best practices to use constructor with for list initialization? How to assign values to list using a constructor, so if no value passed a default …

  10. Where clause in Linq in List c# - Stack Overflow

    var list=testList.Where(f=>f.Family=="").Select(n=>n.Name); In Linq you need to apply the filter before projecting (unless the filter applies to the results of the projection rather than the …