2015-02-05 70 views
-1

我正在關注THIS文章,用於在應用程序中存儲安全數據。但是,當我使用ProtectedData類我得到這個錯誤:名稱'ProtectedData'在當前上下文中不存在

The name 'ProtectedData' does not exist in the current context 

搜索發現THIS問題,說我需要一個參考,以使其工作添加到System.Security.dll

我是Windows Phone/C#/ Visual的新手。我如何添加該參考?

感謝

回答

-1

從MSDN https://msdn.microsoft.com/en-us/library/hh708954.aspx

To Add a Reference in a C# or Visual Basic Project

  1. On the menu bar, choose File, Open.
  2. Navigate to your solution or project.
  3. In Solution Explorer, open the shortcut menu for the project node, and then choose Add Reference.
  4. Specify the references to add, and then choose the OK button.

你會發現System.Security組件下 - >框架。然後,您將不得不在您的課程中添加使用說明

+0

鏈接可能過期,您應在此處發佈相關詳細信息。 – alterfox 2015-02-05 17:10:33

+0

當我打開程序集 - >框架部分時,我收到以下消息:「所有的Frameowork程序集都已經被引用,請使用對象瀏覽器來瀏覽框架中的引用」。單擊瀏覽文件夾Programs \ VisualStudio \ Common7 \ IDE已打開,但未找到任何名爲System.Security.dll的文件 – Addev 2015-02-05 17:14:00

相關問題