How to do in c#

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I am study a walkthrough at
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_deploy/html/4bd4b63a-2b91-431e-839c-5752443f0eaf.htm

It is a VB example, there are code:
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
_
Public Overrides Sub Commit(ByVal savedState As _
System.Collections.IDictionary)

MyBase.Commit(savedState)
System.Diagnostics.Process.Start("http://www.microsoft.com")
End Sub
I want to rewrite it to c#.How can I do with the first line
:<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
_
 
ad said:
I am study a walkthrough at
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_deploy/html/4bd4b63a-2b91-431e-839c-5752443f0eaf.htm

It is a VB example, there are code:
<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
_
Public Overrides Sub Commit(ByVal savedState As _
System.Collections.IDictionary)

MyBase.Commit(savedState)
System.Diagnostics.Process.Start("http://www.microsoft.com")
End Sub
I want to rewrite it to c#.How can I do with the first line
:<Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)>
_

try this:

[Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)]

That is an attribute, and that is what they look like in C#.

there should be a C# example right next to the VB.NET example.
 
[Security.Permissions.SecurityPermission(Security.Permissions.SecurityAction.Demand)]

public override void Commit(System.Collections.IDictionary savedState)
{

base.Commit(savedState);
System.Diagnostics.Process.Start("http://www.microsoft.com");
}


"How do I get to Carnegie Hall"?
"Practice, my Son. Practice!"

--Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top