Je voudrais implémenter l'interface C# suivante F #:Comment implémenter une interface C# en 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);
}
C'est ce que je l'ai essayé, mais il me donne: « construction incomplète structuré ou avant ce point dans l'expression »
#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
Qu'est-ce que je fais de mal? Peut-être que l'indentation est fausse?
Peut-être manque juste les parens sur 'nouveau System.Object()'? –
Qu'est-ce qu'une interface C#? Vous avez défini une interface CLR en C#. –