Dictionary vs KeyValuePair vs Struct - C#
Dictionary : // Declare Dictionary and assign value Dictionary < string , object > parameter = new Dictionary < string , object >(); parameter [ " View " ] = viewComp ; parameter [ " Play " ] = true ; FunctionName( parameter ); // Use Dictionary private void FunctionName ( object parameter ) { Dictionary < string , object > dict = ( Dictionary < string , object >) parameter ; GameObject viewComp = ( GameObject ) dict [ " View " ]; bool play = ( bool ) dict [ " Play " ]; UseValuesInFunction ( viewComp , play ); } KeyValuePair : KeyValuePair < GameObject , bool > parameter = new KeyValuePair < GameObject , bool >( viewComp ,...