question

IngeborgConradOscar-8380 avatar image
0 Votes"
IngeborgConradOscar-8380 asked IngeborgConradOscar-8380 answered

Is there a better way to code this example?

this code i got from a youtube tutorial and the person explains how the server and client are communicating, but how can i get the information from the server to the clinent.

What line of code does get the information?


107290-whatsapp-image-2021-06-20-at-193526-6.jpeg107353-whatsapp-image-2021-06-20-at-193526-5.jpeg107354-whatsapp-image-2021-06-20-at-193526-4.jpeg107305-whatsapp-image-2021-06-20-at-193526-3.jpeg107349-whatsapp-image-2021-06-20-at-193526-2.jpeg107298-whatsapp-image-2021-06-20-at-193526-1.jpeg107381-whatsapp-image-2021-06-20-at-193526.jpeg





dotnet-csharp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

APoblacion avatar image
1 Vote"
APoblacion answered

What line of code does get the information?

Well, the key is in the two lines that you have in LoadServer_Click. First, you call Activator.GetObject to create an instance of the method in the remote server. And then you do ds=dss.GetDataSet(), which execute on said instance the method that obtains the data.

This will work, but as someone already commented it is considered obsolete nowadays. If you are looking at this for some new software that you are going to develop (as opposed to learning how it works for the purpose of maintaining a legacy application) then you should consider other more modern options, such as a REST service or at the very least WCF, but not .Net Remoting.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IngeborgConradOscar-8380 avatar image
0 Votes"
IngeborgConradOscar-8380 answered

maybethishelps.pdf (56.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.