C# to VB.NET, Paython, Ruby or VB.NET to C#, Paython, Ruby Conversion Tools

Posted: December 5, 2010 in ASP.NET
Tags: , , , , ,

.NET platform is an umbrella of languages. Many times developers who work in .NET  will have or find code in one language  when they need it in different language.

Many sites provide language conversion options which is very handy for developers and following link is one of such link …

http://www.developerfusion.com/tools

public void PrimeNumberCheck(object sender, ServerValidateEventArgs args)
{
int iPrime = Convert.ToInt32(args.Value);
int iLoop = 0;
int iSqrt = Convert.ToInt32(Math.Sqrt(iPrime));

for (iLoop = 2; iLoop <= iSqrt; iLoop++) {
if (iPrime % iLoop == 0) {
args.IsValid = false;
return;
}
}

args.IsValid = true;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s