My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones    
 
1
2
3
4
5
6
7
8
9
10
11
12
namespace yab

open System
open System.Reflection

module TypeHelper =

let is<'t> t = t = typeof<'t>
let isNullable <'t when 't : struct and 't : (new : unit -> 't) and 't :> ValueType> t = t = typeof<'t> or t = typeof<Nullable<'t>>

let private get position anArray = Array.get anArray position
let getShortestConstructor (t:Type) = t.GetConstructors() |> Array.sortBy (fun c -> c.GetParameters() |> Array.length) |> get 0

Change log

5e23a8090c27 by mark on May 3, 2010   Diff
mark: initial checkin for yab
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 459 bytes, 12 lines
Powered by Google Project Hosting