Exit

  • Thread starter Thread starter Madhavi
  • Start date Start date
M

Madhavi

Hi

in VB i use Exit Property or Exit Sub

what shud i use in C# for Exit

Maadhavi
 
Not to mention instead of

Function MyFunc() As String
MyFunc = "Something";
End Function

use

Function MyFunc() As String
return "Something";
End Function


You can/should also use return in VB.NET

Ciaran O'Donnell
 
drop your semicolon... you're still in C#land ;)

Jon

Not to mention instead of

Function MyFunc() As String
MyFunc = "Something";
End Function

use

Function MyFunc() As String
return "Something";
End Function


You can/should also use return in VB.NET

Ciaran O'Donnell
 
Dang,

I wish the VB.Net compiler would ignore those :P



drop your semicolon... you're still in C#land ;)

Jon

Not to mention instead of

Function MyFunc() As String
MyFunc = "Something";
End Function

use

Function MyFunc() As String
return "Something";
End Function


You can/should also use return in VB.NET

Ciaran O'Donnell

Madhavi said:
Thank you it solved my purpose

maadhavi


Jon Skeet [ C# MVP ] wrote:
in VB i use Exit Property or Exit Sub

what shud i use in C# for Exit

The "return" statement.
 

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