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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -