f#接口操作示例代码
代码语言:f#
所属分类:其他
代码描述:f#接口操作示例代码
代码标签: 示例
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
type IPerson = abstract Name : string abstract Enter : unit -> unit abstract Leave : unit -> unit type Student(name : string, id : int) = member this.ID = id interface IPerson with member this.Name = name member this.Enter() = printfn "Student entering premises!" member this.Leave() = printfn "Student leaving premises!" type StuffMember(name : string, id : int, salary : float) = let mutable _salary = salary member this.Salar.........完整代码请登录后点击上方下载按钮下载查看
网友评论0