Click here to Skip to main content
15,920,632 members
Home / Discussions / C#
   

C#

 
AnswerRe: Dataset TableNewRow Event Pin
OriginalGriff4-Jul-12 22:34
mveOriginalGriff4-Jul-12 22:34 
AnswerRe: Dataset TableNewRow Event Pin
Midnight Ahri4-Jul-12 23:04
Midnight Ahri4-Jul-12 23:04 
GeneralRe: Dataset TableNewRow Event Pin
OriginalGriff4-Jul-12 23:59
mveOriginalGriff4-Jul-12 23:59 
GeneralHow to Update DataTable to MySql database Without loop Pin
rongvangso74-Jul-12 15:26
rongvangso74-Jul-12 15:26 
GeneralRe: How to Update DataTable to MySql database Without loop Pin
Abhinav S4-Jul-12 16:16
Abhinav S4-Jul-12 16:16 
GeneralRe: How to Update DataTable to MySql database Without loop Pin
amirafoods4-Jul-12 20:25
amirafoods4-Jul-12 20:25 
GeneralSOLVED!! (do the happy dance!) Dictionary Error? (or User Error! more likely) Pin
glennPattonWork34-Jul-12 5:33
professionalglennPattonWork34-Jul-12 5:33 
AnswerRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon4-Jul-12 6:36
mvePete O'Hanlon4-Jul-12 6:36 
Ah. I see what you're trying to get - it's a lot clearer now. Anyway, you might find this code to be more of a match:
C#
class Program
{
    static void Main(string[] args)
    {
        var x = GetDriverInfo("ConfigMgr Remote Control Driver");
    }
    public class SignedDriver
    {
        public string DriverVersion;
        public string DeviceName;
        // Note that this is not really a date.
        // The format is a touch weird.
        public string DriverDate;
    }
    public static SignedDriver GetDriverInfo(string driverName)
    {
        SignedDriver driver = new SignedDriver();
        SelectQuery query = new SelectQuery("Win32_PnPSignedDriver");
        query.Condition = string.Format("DeviceName='{0}'", driverName);
        ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
        foreach (ManagementObject manageObject in searcher.Get())
        {
            object driverVer = manageObject.Properties["DriverVersion"].Value;
            object deviceName = manageObject.Properties["DeviceName"].Value;
            object driverDate = manageObject.Properties["DriverDate"].Value;
            if (deviceName != null)
            {
                driver.DeviceName = deviceName.ToString();
                driver.DriverDate = driverDate.ToString();
                driver.DriverVersion = driverVer.ToString();
            }
        }
        return driver;
    }
}

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork34-Jul-12 22:37
professionalglennPattonWork34-Jul-12 22:37 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon4-Jul-12 23:09
mvePete O'Hanlon4-Jul-12 23:09 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork34-Jul-12 23:35
professionalglennPattonWork34-Jul-12 23:35 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon4-Jul-12 23:43
mvePete O'Hanlon4-Jul-12 23:43 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 0:04
professionalglennPattonWork35-Jul-12 0:04 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 0:11
mvePete O'Hanlon5-Jul-12 0:11 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 0:30
professionalglennPattonWork35-Jul-12 0:30 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 0:32
mvePete O'Hanlon5-Jul-12 0:32 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 0:45
professionalglennPattonWork35-Jul-12 0:45 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 0:54
mvePete O'Hanlon5-Jul-12 0:54 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 1:35
professionalglennPattonWork35-Jul-12 1:35 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 1:53
mvePete O'Hanlon5-Jul-12 1:53 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 2:24
professionalglennPattonWork35-Jul-12 2:24 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 4:46
professionalglennPattonWork35-Jul-12 4:46 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 5:33
mvePete O'Hanlon5-Jul-12 5:33 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
glennPattonWork35-Jul-12 5:41
professionalglennPattonWork35-Jul-12 5:41 
GeneralRe: Dictionary Error? (or User Error! more likely) Pin
Pete O'Hanlon5-Jul-12 5:49
mvePete O'Hanlon5-Jul-12 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.