Hi @Rojik, Marek ,
The C# method to get device registration status (GetDeviceRegistrationStateAsync) is equivalent to the Java method I referred to above (getDeviceRegistrationState) - both of these are in the service client libraries rather than the device client libraries - and both are wrappers around the REST API Runtime Registration - Device Registration Status Lookup.
The documentation you referred to goes on to discuss the benefits of caching the information originally received from DPS:
"We recommend not provisioning on every reboot of the device, as this could cause some issues when reprovisioning several thousands or millions of devices at once. Instead you should attempt to use the Device Registration Status Lookup API and try to connect with that information to IoT Hub. If that fails, then try to reprovision as the IoT Hub information might have changed. Keep in mind that querying for the registration state will count as a new device registration, so you should consider the Device registration limit. Also consider implementing an appropriate retry logic, such as exponential back-off with randomization, as described on the Retry general guidance. In some cases, depending on the device capabilities, it’s possible to save the IoT Hub information directly on the device to connect directly to IoT Hub after the first-time provisioning using DPS occurred..."
Also, take a look at Best practices for large-scale IoT device deployments for more information about reprovisioning and IoT Hub connectivity - it includes a useful code sample.