TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Praveen Kumar
283
6.6k
2.3m
Win32_SerialPort Class not working in Windows 8.1 Pro
Apr 7 2021 4:46 AM
In Windows 8.1 Pro, the connected USB device list is not showing while USB device is showing into Device Manager(Control Panel).
I have a .NET 3.5 application, where I am using the following code to get the list of connected USB Serial Port device
ManagementObjectCollection collection;
using
(var searcher =
new
ManagementObjectSearcher(@
"Select * From Win32_SerialPort"
))
{
string
paytmUPIPort =
""
;
collection = searcher.Get();
foreach
(var serialDevice
in
collection)
{
paytmUPIPort =
string
.Format(
"{0}"
, serialDevice.GetPropertyValue(
"DeviceID"
));
if
(paytmUPIPort.ToUpper().Contains(
"COM"
))
{
collection.Dispose();
return
paytmUPIPort;
}
}
}
collection.Dispose();
Reply
Answers (
1
)
how do i subtract year from current year.
find age using query in textbox