Tôi muốn thực hiện các giao diện # C sau trong F #:Làm cách nào để triển khai giao diện C# trong F #?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Addins;
[TypeExtensionPoint]
public interface ISparqlCommand
{
string Name { get; }
object Run(Dictionary<string, string> NamespacesDictionary, org.openrdf.repository.Repository repository, params object[] argsRest);
}
Đây là những gì tôi đã cố gắng, nhưng nó mang lại cho tôi: "xây dựng cấu trúc Incomplete tại hoặc trước thời điểm này trong khái niệm"
#light
module Module1
open System
open System.Collections.Generic;
type MyClass() =
interface ISparqlCommand with
member this.Name =
"Finding the path between two tops in the Graph"
member this.Run(NamespacesDictionary, repository, argsRest) =
new System.Object
Tôi đang làm gì sai? Có thể thụt lề là sai?
Có lẽ chỉ thiếu dấu ngoặc trên 'System.Object mới() '? –
Giao diện C# là gì? Bạn đã xác định một giao diện CLR trong C#. –