I have five text files that need to be loaded into memory. I set up a method in the main class that loads them into a some strings and stores them in a list. I need to call another method that will use the files loaded into memory. When I pass the List to the method, does it use it as a reference or does it copy the List to a new List object, essentially duplicating the data? I need to know because I call this method 500 or so times.
Share
A list/collection/array/enumerable are all reference types, so they will be passed as reference. No cloning.