string.Split()
returns an array – you can convert it to a list using ToList()
:
listStrLineElements = line.Split(',').ToList();
Note that you need to import System.Linq
to access the .ToList()
function.
Related Posts:
- Merge two (or more) lists into one, in C# .NET
- ArrayList vs List<> in C#
- An existing connection was forcibly closed by the remote host
- I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- No connection could be made because the target machine actively refused it?
- Could not load file or assembly or one of its dependencies
- What does a lock statement do under the hood?
- Error : Could not load file or assembly or one of it’s dependencies
- Could not load file or assembly or one of its dependencies
- Priority queue in .Net
- What is the difference between int, Int16, Int32 and Int64?
- What is the purpose of nameof?
- Error 1053 the service did not respond to the start or control request in a timely fashion
- finding the maximum length of lists in c#
- Get current folder path
- foreach vs someList.ForEach(){}
- System.web.mvc missing
- Nullable object must have a value?
- Access to the path is denied
- How can I find a specific element in a List
? - What does mscorlib stand for?
- Metadata file ‘.dll’ could not be found
- Check if list is empty in C#
- C# List
to string with delimiter - WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- Convert a list of strings to a single string
- Add new item in existing array in c#.net
- What is clr.dll on .Net framework and what does it do?
- what is this oleaut32.dll?
- How do I declare a DefaultValue attribute whose value is an array of strings?
- HttpWebRequest-The remote server returned an error: (400) Bad Request
- How to use the “Using” statement in ASP.net razor webpages?
- Reading settings from app.config or web.config in .NET
- How do I create a Shared Code project (.shproj)
- How to initialize a list of strings (List
) with many string values - There is no argument given that corresponds to the required formal parameter – .NET Error
- Select distinct using linq
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Invalid URI: The format of the URI could not be determined
- Could not establish trust relationship for SSL/TLS secure channel — SOAP
- How to make an HTTP POST web request
- How to add comments into a Xaml file in WPF?
- Why did I get the compile error “Use of unassigned local variable”?
- Reading CSV file and storing values into an array
- Are 2 dimensional Lists possible in c#?
- IEnumerable vs List – What to Use? How do they work?
- How to easily initialize a list of Tuples?
- Converting from IEnumerable to List
- How do you sort a dictionary by value?
- EntityType has no key defined error
- HTML.ActionLink method
- How do I restart my C# WinForm Application?
- finding the maximum length of lists in c#
- Remove element of a regular array
- Best way to reverse a string
- Merging two arrays in .NET
- How can I know if a process is running?
- String was not recognized as a valid DateTime ” format dd/MM/yyyy”
- Substring index and length must refer to a location within the string
- windows could not start service on local computer error 5 access is denied
- Visual Studio keeps crashing
- How can I implement static methods on an interface?
- How to add List<> to a List<> in asp.net [duplicate]
- Catch multiple exceptions at once?
- How to delete a file after checking whether it exists
- c# Show Windows Form
- How to convert UTF-8 byte[] to string
- .NET String.Format() to add commas in thousands place for a number
- Sort list by field (C#)
- The remote server returned an error: (405) Method Not Allowed. WCF REST Service
- Linq select objects in list where exists IN (A,B,C)
- Produce a random number in a range using C#
- How do I concatenate two arrays in C#?
- How to play a sound in C#, .NET
- How can I delete a file that is in use by another process?
- Which passwordchar shows a black dot (•) in a winforms textbox?
- What is a quick way to force CRLF in C# / .NET?
- How do I fix a .NET windows application crashing at startup with Exception code: 0xE0434352?
- How to resolve file being used by another process?
- How to enable assembly bind failure logging (Fusion) in .NET
- How to make inline functions in C#
- C# Convert List
to Dictionary - How to properly make a http web GET request
- Strip double quotes from a string in .NET
- Convert double to float by cast or Convert.ToSingle()?
- c# .net change label text
- How to avoid a System.Runtime.InteropServices.COMException?
- How do I clone a generic list in C#?
- How can I generate random alphanumeric strings?
- Sequence contains more than one element
- How do you do a deep copy of an object in .NET?
- Playing a MP3 file in a WinForm application
- .NET Core vs Mono
- Best way to randomize an array with .NET
- Encrypt and decrypt a string in C#?
- Unrecognized escape sequence for path string containing backslashes
- Linq: GroupBy, Sum and Count
- How to enumerate an enum
- How to set session timeout in web.config