From 789692758b3583087728093e8eb061df63222b14 Mon Sep 17 00:00:00 2001 From: Brad Collins Date: Sat, 13 Jul 2019 19:02:14 -0500 Subject: [PATCH] Corrected (?) F# signature of Receive method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `Receive` method's F# signature was incorrect—the remoteEP parameter was missing: ``` xml ``` Changed the signature and the usage to the following: ``` xml ``` However, I am not quite sure how correct this is. The 'Value' attribute is probably correct, but the 'Usage' attribute is suspect. One would not simply pass in `ref remoteEP` but rather something more like this: ``` fsharp let remoteEndPointRef = ref (IPEndPoint (IPAddress.Any, 0)) let bytes = udpClient.Receive remoteEndPointRef printfn "Received from %A: %A" !remoteEndPointRef bytes ``` Finally, there is no F# example code. I should love to submit an F# version of the C# sample, but it is not at all clear to me how to add it! The C# code sample is apparently an include of some sort: ``` [!code-csharp[Classic UdpClient.PublicMethodsAndPropertiesExample#11](~/samples/snippets/csharp/VS_Snippets_Remoting/Classic UdpClient.PublicMethodsAndPropertiesExample/CS/source.cs#11)] ``` Is there a way to do something similar to include an F# sample? --- xml/System.Net.Sockets/UdpClient.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Net.Sockets/UdpClient.xml b/xml/System.Net.Sockets/UdpClient.xml index 82f7a202160..c45a3d25fe0 100644 --- a/xml/System.Net.Sockets/UdpClient.xml +++ b/xml/System.Net.Sockets/UdpClient.xml @@ -2091,7 +2091,7 @@ - + Method System @@ -2702,4 +2702,4 @@ Call IDisposable.Dispose when you are finished using the - \ No newline at end of file +