草庐IT

MSVC_PROPERTIES

全部标签

c++ - 使用 MSVC 并发异步写入文件?

目前我正在使用单线程和fseek/fwrite循环将数据保存到一个大文件中。但当然,节省是瓶颈。为了消除这个瓶颈,我想我可以为异步文件写入创建一个线程,但这会阻止下一个迭代线程中的文件访问。有什么方法可以在VisualC/C++中并发异步写入文件吗?(操作系统是Windows) 最佳答案 使用函数:CreateFileMappinghttp://msdn.microsoft.com/en-us/library/windows/desktop/aa366537(v=vs.85).aspx内存将输出文件映射到内存,然后您可以让多个线程同

c# - 如何从控制台应用程序中访问 Properties 命名空间?

我正在尝试存储/检索存储在应用程序设置中的值。在我的控制台应用程序中,我似乎无法访问Properties.Setting命名空间。我的网上冲浪表明,在控制台应用程序中执行此操作可能需要做更多的工作。如何做到这一点?stringtest=Properties.Settings.Default.MyString;谢谢! 最佳答案 默认情况下,控制台应用程序中没有设置文件。但是,您只需在解决方案资源管理器中右键单击您的项目,选择“属性”,然后在出现的窗口中单击“设置”选项卡,即可添加一个。应该有一个链接,上面写着“单击此处创建默认设置文件

c# - 分页后 TableCell 拆分 : remainder split part loses original cell properties

我有一个关于WPFFlowDocumentTable上的TableCell拆分策略的问题。这是一个简单的代码,可以重现问题:MainWindow.xaml.cs//////InteractionlogicforMainWindow.xaml///publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();vartable=newTable(){BorderThickness=newThickness(1),BorderBrush=Brushes.Black,CellSpacing=0};var

C# 错误 : The call is ambiguous between the following methods or properties. 运算符重载

我在名为Dinero的命名空间中有2个带有重载运算符的类,这些是2个类:第一个:namespaceDinero{classDollar{#regionAtributospublicDoublecant;#endregion#regionConstructorespublicDollar(){this.cant=0;}publicDollar(Doubleamount){this.cant=amount;}#endregion#regionSobrecargadeOperadorespublicstaticDollaroperator+(Euroeu,Dollardol){Dollard

c# - 使用 "Expression Bodied Functions and Properties"有什么好处

这个问题在这里已经有了答案:Expression-bodiedfunctionmembersefficiencyandperformanceinC#6.0(2个答案)关闭6年前。我确实看到很多人使用该新功能,但使用这些表达式有什么好处?Examples:publicoverridestringToString()=>string.Format("{0},{1}",First,Second);publicstringText=>string.Format("{0}:{1}-{2}({3})",TimeStamp,Process,Config,User);这个问题不同于thisone,因为

c# - 简单的linq问题: using linq to get an array of properties

假设我们有一个简单的类publicclassFoo{publicstringFooName;}现在我们想对其做一些简单的工作。publicvoidSomeCallerMethod(ListlistOfFoos){string[]fooNames=listOfFoo.//Whattodohere?}如果我什至知道调用什么方法,我可能就能找到其余的部分。 最佳答案 您想将您的类列表转换为字符串数组。理想的方法是Select,它对可枚举对象的每个元素进行操作,并根据您返回的类型构建一个新的可枚举对象。您需要将lambda表达式放入返回名称

c# - CA1819 : Properties shouldn't return arrays - What is the right alternative?

我以前遇到过这个FxCop规则,但对如何解决违规问题并不满意(thread1、thread2)。我现在有另一个案例,我需要纠正违反CA1819的行为亲切。具体来说,我有一个算法库,它使用如下所示的公共(public)“输入对象”对曲线(x,y)执行一些分析计算:publicclassInputObject{publicdouble[]X{get;set;}publicdouble[]Y{get;set;}//+lotsofotherthingswell}此对象的X和Y属性在库中的数百个位置使用,通常使用索引。输入对象永远不会被算法改变,但实际上如果是这样也无关紧要。另外,.Length

Cucumber extend reports的extent.properties配置

extent.reporter.spark.class=tech.grasshopper.reporters.ReporterAdapter$SparkReportAdapterextent.reporter.json.class=tech.grasshopper.reporters.ReporterAdapter$JsonReportAdapterextent.reporter.pdf.class=tech.grasshopper.reporters.ReporterAdapter$PDFReportAdapterextent.reporter.html.class=tech.grassho

c# - 多线程,Task.Run 错误 'The call is ambiguous between the following methods or properties'

当我尝试构建项目时,显示以下错误消息。Thecallisambiguousbetweenthefollowingmethodsorproperties:'System.Threading.Tasks.Task.Run(System.Action)'and'System.Threading.Tasks.Task.Run(System.Func)'我该如何解决这个问题?publicstaticclassMaintananceManager{privatestaticThreadSafeSocialMediaListPostList=newThreadSafeSocialMediaList(

c# - Properties.Settings.Default.Save(); ->那个文件在哪里

我有一个使用“设置”的应用。要保存我使用的设置:Properties.Settings.Default.Save();阅读我使用的:Properties.Settings.Default.MyCustomSetting;在我的应用程序文件夹中,我只有exe文件。没有配置文件。我的应用程序运行良好,可以读写设置。如果该文件不在应用程序文件夹中,该文件位于何处? 最佳答案 在我的WindowsXP机器上,设置保存在C:\DocumentsandSettings\\ApplicationData\下某处名为user.config的文件中。