Hi everyone,
Is it possible to use switch statement over if else when condition is made of 2 variables.
Thanks.
added:
foreach( DataRow row in workingTable.Rows )
{
if( isKey && isValue )
workingDictionary.Add( row[ keyIdentifier ].ToString(), row[ valueIdentifier ] );
else if( isKey && !isValue )
workingDictionary.Add( row[ keyIdentifier ].ToString(), row[ sValueIdentifier ] );
else if( !isKey && isValue )
workingDictionary.Add( row[ sKeyIdentifier ].ToString(), row[ valueIdentifier ] );
else
workingDictionary.Add( row[ sKeyIdentifier ].ToString(), row[ sValueIdentifier ] );
}