1)在项目中添加引用 System.Security
2)在程序文件开始的地方,添加
using System.Security.Cryptography;
3)在.net framwork中没有 EncryptionAndDecryption类。如果EncryptionAndDecryption类定义在其他项目中,那么在你的项目中添加对那个项目的引用。