Subject: Possible bug in UWP (Windows 10) when creating group chat
I'm using Matrix XMPP with my Xamarin Forms app. The code for both Android and UWP is the same (in regards to the code that handles XMPP functionality).
Here is the code that gives the error in UWP (but works in Android):
When trying to access the Field object's Type property, it throws a null reference error on UWP.
Even when looking at retField.Type in the debugger, it also says NullReferenceException, which is strange because I am setting that property, not getting it.
Here is the code that gives the error in UWP (but works in Android):
- var xdata = query.XData;
- foreach (var field in xdata.GetFields())
- {
- retField.Type = field.Type; // The error is occurring here
- retField.Var = field.Var;
- if (field.Var == "muc#roomconfig_roomname")
- retField.AddValue("My Testing room");
- else
- retField.AddValues(field.GetValues().ToArray());
- xDataResult.AddField(retField);
- }
When trying to access the Field object's Type property, it throws a null reference error on UWP.
Even when looking at retField.Type in the debugger, it also says NullReferenceException, which is strange because I am setting that property, not getting it.
This post was edited on 2016-11-17, 11:43 by Alex.
Edit reason: added csharp code formatter
Edit reason: added csharp code formatter