c# - Converting Array length to Mega byte -
it might sound really stupid, there way can convert arraylength mega bytes.
xmldictionaryreaderquotas readerquotas = new xmldictionaryreaderquotas(); readerquotas.maxarraylength = int.maxvalue; binding.readerquotas = readerquotas; i got piece , not sure how give maximum size 50 mega bytes.
from msdn, looks maxarraylength in bytes:
gets , sets maximum allowed array length.
property value type: system.int32
the maximum allowed array length. default 16384.
this quota governs maximum array length created , returned various api calls. affects special array apis byte arrays returned readcontentasbase64(). limit not affect readcontentasbase64() override takes array populated data.
1 kb 1024 bytes. 1 mb 1024 kb. sounds you're looking this:
readerquotas.maxarraylength = 1024 * 1024 * 50; // 50 mb
Comments
Post a Comment