由于其保护级别,无法访问"System.IO.SearchOption"

编程入门 行业动态 更新时间:2024-10-26 01:24:23
本文介绍了由于其保护级别,无法访问"System.IO.SearchOption"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Silverlight应用程序中,我使用了代码:::

string[] theFiles = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.History), "*", SearchOption.AllDirectories);

在代码构建期间出现错误 错误:``System.IO.SearchOption''由于其保护级别而无法访问 现在,如果我想搜索历史记录文件怎么办, :rose: 谨记 Er.Aashish Khandelwal

解决方案

无论您问多少次不同,最终结果都是相同的. Silverlight已沙盒化,您无法在浏览器中编写应用程序,并且期望它可以免费访问用户的硬盘驱动器.鉴于我所看到的当今外包行业正在发生的工作,如果不是这种情况,我将断开计算机与Internet的连接,或者至少需要每个在网页上工作的人的简历,在我考虑查看之前.当然,如果您不太可能成功完成业务并疯狂地寻求成功,那么Silverlight应用程序的用户将会震惊并发怒,发现您已删除了他们的所有cookie和浏览历史记录.

In silverlight application i used the code:::

string[] theFiles = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.History), "*", SearchOption.AllDirectories);

during build of code i got error ERROR::''System.IO.SearchOption'' is inaccessible due to its protection level Now what to do if i wanna search history files, :rose: WITH REGARDS Er.Aashish Khandelwal

解决方案

No matter how many times you ask this differently, the end result is the same. Silverlight is sandboxed, and you cannot write an app inside your browser, and expect it to have free access to your users hard drive. Given what I see of the sort of work happening in the outsourcing industry today, if that were not the case, I''d disconnect my computer from the internet, or at least require the bio of every person who worked on a web page, before I''d consider viewing it. Certainly, the users of your silverlight app, will be horrified and furious to find that you''ve deleted all their cookies and their browsing history, in the unlikely event that you succeed in your bizare and insane quest to do so.

更多推荐

由于其保护级别,无法访问"System.IO.SearchOption"

本文发布于:2023-11-26 20:01:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634984.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:于其   无法访问   级别   quot   IO

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!