Currently, US citizens are somewhat banned from going to Iran. Even while US citizens are not banned, it is still a generally dangerous place to go as a US citizen. Switzerland, however, does have good consular relations with Iran and their citizens are not banned.
This leads to my question: if (theoretically of course) a US and Swiss dual-citizen who is of no persian descent wants to travel to a country such as Iran strictly as a tourist, can he/she go with that Swiss passport legally, and can he/she remain safe in that country? Would Iran be able to figure out that you are a US citizen?