You are developing an auditing application to display the trusted ClickOnce applications that are installed on a computer.
You need the auditing application to display the origin of each trusted application.
Which code segment should you use?
A.
ApplicationTrustCollection trusts;
trusts = ApplicationSecurityManager.UserApplicationTrusts;
foreach (ApplicationTrust trust in trusts)
{
Console.WriteLine(trust.ToString());
}
B.
ApplicationTrustCollection trusts;
trusts = ApplicationSecurityManager.UserApplicationTrusts;
foreach (ApplicationTrust trust in trusts)
{
Console.WriteLine(trust.ExtraInfo.ToString());
}
C.
ApplicationTrustCollection trusts;
trusts = ApplicationSecurityManager.UserApplicationTrusts;
foreach (ApplicationTrust trust in trusts)
{
Console.WriteLine(trust.ApplicationIdentity.FullName);
}
D.
ApplicationTrustCollection trusts;
trusts = ApplicationSecurityManager.UserApplicationTrusts;
foreach (object trust in trusts)
{
Console.WriteLine(trust.ToString());
}
Correct answer is C