Namecheap changed their api interface and one of the query parameters that was named "DnsRecordType" is now named "RecordType". That is the reason why API calls on namecheap will end up with response: "Object reference not set to an instance of an object.".
Solution
To fix this issue, all you need to do is to change first parameter of function call (on line 31)
from : query.AddParameter("DnsRecordType" + (i + 1), Enum.GetName(typeof(DnsRecordType), request.HostEntries[i].RecordType));to: query.AddParameter("RecordType" + (i + 1), Enum.GetName(typeof(DnsRecordType), request.HostEntries[i].RecordType));
Class - DnsApi Method - SetHosts
Namecheap changed their api interface and one of the query parameters that was named "DnsRecordType" is now named "RecordType". That is the reason why API calls on namecheap will end up with response: "Object reference not set to an instance of an object.".
Solution
query.AddParameter("DnsRecordType" + (i + 1), Enum.GetName(typeof(DnsRecordType), request.HostEntries[i].RecordType));
to:query.AddParameter("RecordType" + (i + 1), Enum.GetName(typeof(DnsRecordType), request.HostEntries[i].RecordType));