Hello, I'm having a problem saving a data while doing a QRcode reading that complains about this error. Someone could help. Thank you
Follow the code below:
When doing the debugger in the code as shown in the data.length (date is given) is null, but as it does not show that null, show a value that the application can not close or be hang. Thank you
The property Length belongs to string class , here you are calling null.Length , so the exception throws.
Check your code where the method GetDateFromHex locates and what's the value of date you populate.
Or modify the logic to avoid the exception .
private string GetDateFromHex(string date)
var output = string.Empty;
if (date == null)
return output; //protection
Hello ColeX, I got to do what you did the GetDateFromHex error continues the error, but to make life easier I'm sending these codes to understand the path where it goes in xarin forms
Try to use DateTime.ParseExact instead , and check the date time format.
For example , if the string is 17/5/2017 19:10:00 , the format you set should be dd/M/yyyy HH:mm:ss .
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies