BluetoothEndPoint does not contain a constructor that takes 2 arguments
See original GitHub issueOn version 4.0.4 when I code the following line in a Visual Studio 2017 .NET Framework 4.6.1 Windows Forms application:
BluetoothEndPoint blep = new BluetoothEndPoint(BluetoothAddress.Parse("001122334455"), BluetoothService.SerialPort);
I get the error “BluetoothEndPoint does not contain a constructor that takes 2 arguments”
As per the documentation BluetoothEndPoint has constructor that takes 2 or 3 arguments.
Note: I am using 4.0.4 version because 4.0.5 nuget package fails to install as per #74
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:34 (7 by maintainers)
Top Results From Across the Web
Does not contain a constructor that takes 2 arguments?
You need to declare the constructor for your ContactNo class. Classes only provides a default constructor with no arguments. The constructor you ...
Read more >Compiler Error CS1729
'type' does not contain a constructor that takes 'number' arguments. This error occurs when you either directly or indirectly invoke the ...
Read more >Does not contain a constructor that takes 2 arguments
Solution 2 constructors. Of course the compiler cannot accept that. You have either to add the required two arguments constructor or modify the ......
Read more >'Chunk' does not contain a constructor that takes 2 arguments
I've wrote a script that spawns chunk, but i've got this error and i don't know how to fix it. This is my...
Read more >C# Error: Class does not contain a constructor that takes ...
This is a build error in C#. This error ClassName does not contain a constructor that takes N arguments is thrown when you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@m1adow Check Microsoft Rfcomm example on their GitHub. You do not need use while(true). https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/BluetoothRfcommChat
You also need to know that enable and disable SetServiceState is incredible complicated task for windows. Windows will destroy audio endpoint and then create a new one (include a lot of GUID and other data), some app that use headset could stuck.
@m1adow I suppose mac can’t get battery because it is Fake AirPods. You code does nothing because headphone waiting for response. You need read about AT+ commands. You must response on each request from headphones.