C# Razor Practice Questions

In this chapter you will get some practice questions to solve. You must solve them using your programming logic. It will help you to understand razor syntax more efficiently.
Qu 1: Write a program to convert following datatypes:
  1. String "32" into int
  2. Float "12.52" into float
  3. Decimal "123.345" into decimal.
You must check type of value before converting.
Qu 2: Write a program to find all the even number between 12 and 42 using looping and conditional statements.
Qu 3: Write a program to display array on the screen. Array value should be like this. 2,6,2,55,62,64,67
Qu 4: Write a function for calculator with exception handling that returns division of two numbers.

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.