what is best way to prepare C# objects in separate methods -



what is best way to prepare C# objects in separate methods -

what improve method utilize object preparation logic:

a) homecoming value

list<users> users = loadusers(); users = prepareusers(users);

b) or void type

list<users> users = loadusers(); prepareusers(users)

are setting properties on existing user objects or creating new ones?

if you're changing existing objects, there's no reason why you'd want homecoming them, it's redundant. worse, it's misleading - client think objects left untouched , you're creating new objects when in fact you're not.

if you're creating new ones, then, need homecoming them.

c#

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -