samedi 22 juin 2019

How to use delegates in Razor pages

so: I have this library that I'm using, and a particular method requires a callback to work, however I am clueless as to how I can get this information.

@{
MyLibrary.Connect("myEmail", "myPassword", delegate(Client client)
{
    <h3>Connected</h3>
}, delegate (Error error)
{
    <h3>error: @error</h3>
});

}

This is what I'm trying to attempt, but unable to do as it throws errors. enter image description here




Aucun commentaire:

Enregistrer un commentaire