Usually SelectedItems
returns either a collection, an array or an IQueryable
.
Either way you can access items via the index as with an array:
String text = listView1.SelectedItems[0].Text;
By the way, you can save an item you want to look at into a variable, and check its structure in the locals after setting a breakpoint.
Related Posts:
- Get current folder path
- Can’t use System.Windows.Forms
- Invalid URI: The format of the URI could not be determined
- Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on
- How to open a new form from another form
- Can I send SMS Messages from a C# Application?
- How to add a new row to datagridview programmatically
- c# Show Windows Form
- Which passwordchar shows a black dot (•) in a winforms textbox?
- How do I fix a .NET windows application crashing at startup with Exception code: 0xE0434352?
- Playing a MP3 file in a WinForm application
- Add item to Listview control
- Memory Leak caused by System.Drawing.Internal.GPStream
- Convert HTML to PDF in .NET
- C# HttpClient An existing connection was forcibly closed by the remote host
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- Error : Index was outside the bounds of the array.
- No connection could be made because the target machine actively refused it?
- What does a lock statement do under the hood?
- Could not load file or assembly or one of its dependencies
- All possible array initialization syntaxes
- What is C# equivalent of
- What are the benefits to marking a field as `readonly` in C#?
- How to resolve “Input string was not in a correct format.” error?
- ASP.NET 5 MVC: unable to connect to web server ‘IIS Express’
- Why is this code throwing an InvalidOperationException?
- How to add a default Default.aspx to a ASP.NET Web Application Project?
- Only one usage of each socket address (protocol/network address/port) is normally permitted?
- Regex for numbers only
- Why should I use SerializeField?
- C# equivalent of C++ vector, with contiguous memory?
- Access to the path is denied
- What does question mark and dot operator ?. mean in C# 6.0?
- How to jump in Unity 3d?
- ToList().ForEach in Linq
- Proper way to initialize a C# dictionary with values
- Incorrect string value: ‘\xEF\xBF\xBD’ for column
- How do I declare a DefaultValue attribute whose value is an array of strings?
- Unity3d restart current scene
- Get dictionary value by key
- Unity “The associated script can not be loaded” and “Win32Exception: The system cannot find the file specified”
- SQL Insert Query Using C#
- Convert Linq Query Result to Dictionary
- Get single value from dictionary by key
- How to round up the result of integer division?
- What is the difference between “@Scripts.Render” and “
Recommended Hostings
Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.
FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.