lapucca
asked on
How can I iterate through a component collection and read the text of each of the compnent?
I'm using vs2005, .net 2.0. I tried the following code to read the system Securitylog's but am getting error. padLogEntry is an EventyLogEntry
IEnumerator IEnum = padLogEntry.Container.Comp onents.Get Enumerator ();
Error 2 Using the generic type 'System.Collections.Generi c.IEnumera tor<T>' requires '1' type arguments C:\Projects\UnityAdmin\Eve ntReport.c s 62
IEnumerator IEnum = padLogEntry.Container.Comp
Error 2 Using the generic type 'System.Collections.Generi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi rameedev,
I need to read the property of the "Security" log's entry. I think they're stored as components and am wondering how can I read them. thanks.
Hi anaki, I tried it but it gives an error.
Thanks.
I need to read the property of the "Security" log's entry. I think they're stored as components and am wondering how can I read them. thanks.
Hi anaki, I tried it but it gives an error.
Thanks.
You mean to say you want to read msgs in the Security EventLog...Can you clarify?
ASKER
When I double click on an entry of the "Security" log in the system's "Event Viewer", a Property window pops up. In this window, there is a "Description" section that lists many different information like "User Name:, "Domain", "Login ID"......
How can I obtain each of this inforation in my program? Thank you.
How can I obtain each of this inforation in my program? Thank you.
well the above code which i gave you...you can extract most of the information
IEnumerator<Component> IEnum = padLogEntry.Container.Comp