Microsoft.Crm.Sdk.DynamicEntity entity
//Set value to CrmNumber
Microsoft.Crm.Sdk.CrmNumber number = new Microsoft.Crm.Sdk.CrmNumber();
number.Value = ToInt(propertyValue);
entity.Properties[propertyName] = number;
//Set Value to String
entity.Properties[propertyName] = propertyValue.ToString();
Enjoy,
Rami Heleg