I have been using this code for create ProfilePropertyDefinition:
ProfileController.AddPropertyDefinition(new ProfilePropertyDefinition(objUserInfo.PortalID) { PropertyName = propName, PropertyCategory = propCategory, DataType = 2, ReadOnly = false });
objUserInfo.PortalID is an int so I cant pass null here.
There is another way to create a PropertyDefinition with PortalID NULL?