using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.SqlServer.Management.Smo;
namespace ScratchFunctions
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
      Server s = new Server();
      Database d = s.Databases["Scratch"];
      foreach (UserDefinedFunction f in d.UserDefinedFunctions)
      {
        listBox1.Items.Add(f.Name);
      }
      listBox1.Items.Add("--------------------");
      foreach(UserDefinedDataType dt in d.UserDefinedDataTypes)
      {
        listBox1.Items.Add(dt.Name);
      }
      float? @float = null;

      listBox1.Items.Add(@float ?? float.NaN);
    }
  }
}