GenericParameter.cs: override Module properly
[mcs.git] / tests / gtest-132.cs
blobc87da9d304a317d66173c6db442bc0a9c694ef64
1 //-- ex-nullable-sqrt
3 using System;
5 class MyTest {
6 public static int? Sqrt(int? x) {
7 if (x.HasValue && x.Value >= 0)
8 return (int)(Math.Sqrt(x.Value));
9 else
10 return null;
13 public static void Main(String[] args) {
14 // Prints :2:::
15 Console.WriteLine(":{0}:{1}:{2}:", Sqrt(5), Sqrt(null), Sqrt(-5));