RS_:
My Ethernet2 Library came up in the Library manager and was installed from there.
which other Library might you be referring to...?
Mine also came from Library Manager. But here's the problem. Your error messages you posted from the UDPSendReceive example:
RS_:
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp:35:6: error: 'UdpClass' has not been declared
void UdpClass::begin(uint16_t port) {
^
shows you have a file in the Ethernet2 library installation:
C:\Users\RS\Documents\Arduino\libraries\Ethernet2\src\Udp.cpp
but the Ethernet2 library does not have a file of this name, as you can see here:
That's the directory listing of the latest release of Ethernet2 available from Library Manager but all of the other releases also don't have that file.
So it appears you have modified your Ethernet2 library and broken it. You should delete the folder C:\Users\RS\Documents\Arduino\libraries\Ethernet2 and then use Library Manager to reinstall the Ethernet2 library.