[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Rewrite VB sample to C#

Please rewrite the below VB code in C#:

Throw new Exception("Response.Redirect(""Login.aspx"", true)")

The question is how to replace the double double quotes?

Thanks,
0
ksfok
Asked:
ksfok
  • 2
4 Solutions
 
Jaime OlivaresCommented:
Throw new Exception("Response.Redirect(\"Login.aspx\", true)")

0
 
Jaime OlivaresCommented:
Also "throw" keyword  must be lowercase
0
 
Russ SuterCommented:
and don't forget the semicolon at the end!
0
 
Anurag ThakurCommented:
this statement will work
throw new Exception(@"Response.Redirect(""Login.aspx"", true)");

Response.redirect expects a string so two double quotes are required
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now