Which object type should you use?

You are developing an application that will parse a large amount of text.
You need to parse the text into separate lines and minimize memory use while processing data.
Which object type should you use?

You are developing an application that will parse a large amount of text.
You need to parse the text into separate lines and minimize memory use while processing data.
Which object type should you use?

A.
DataContractSerializer

B.
StringBuilder

C.
StringReader

D.
JsonSerializer



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Areks

Areks

Why not B ?

jonny

jonny

Because I think you don’t have to create the String, you should just parse ist and e.g. read one line after the next..

Answer C

Hedz

Hedz

Stringbuilder is faster for string concatenation, here we are parsing text