I can not get notes with this code #308
-
|
sing Microsoft.SqlServer.Server; internal class Program 1 Error (active) CS0104 'Note' is an ambiguous reference between 'Melanchall.DryWetMidi.Interaction.Note' and 'Melanchall.DryWetMidi.MusicTheory.Note' VrijemeDogadanjaMIDI C:\Users\boris\source\repos\VrijemeDogadanjaMIDI\VrijemeDogadanjaMIDI\Program.cs 16 2 Error (active) CS0104 'Note' is an ambiguous reference between 'Melanchall.DryWetMidi.Interaction.Note' and 'Melanchall.DryWetMidi.MusicTheory.Note' VrijemeDogadanjaMIDI |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
Visual Studio has the clear message about what's going on: there is In your short example you can just write: IEnumerable<Melanchall.DryWetMidi.Interaction.Note> notes = file.GetNotes();or var notes = file.GetNotes();or using InteractionNote = Melanchall.DryWetMidi.Interaction.Note;
...
IEnumerable<InteractionNote> notes = file.GetNotes(); |
Beta Was this translation helpful? Give feedback.
-
|
using Microsoft.SqlServer.Server; namespace Proba3 } |
Beta Was this translation helpful? Give feedback.

Visual Studio has the clear message about what's going on: there is
Noteclass in both namespaces -Melanchall.DryWetMidi.InteractionandMelanchall.DryWetMidi.MusicTheory. If you search the error (c# is an ambiguous reference between), you'll find that it's a common situation in .NET world and there are several ways to resolve it.In your short example you can just write:
or
or