Visual Studio 2013 lost code formatting, C#

I've updated my Visual Studio to 2013 Professional, but in doing so I seem to have lost a lot of the code formatting. I've gone into Tools - Options - Environment - Fonts and Colors and reset the defaults. I've even gone Tools - Options - Environment - Import and Export Settings and browsed to my 2012 settings folder, but again I am missing out on a lot of code formatting. Keyword

Visual Studio 2013丢失了代码格式,C#

我已经将我的Visual Studio更新为2013 Professional,但是这样做似乎已经丢失了很多代码格式。 我已经进入工具 - 选项 - 环境 - 字体和颜色,并重置默认值。 我甚至去了工具 - 选项 - 环境 - 导入和导出设置,浏览到我的2012设置文件夹,但我错过了很多代码格式。 关键字突出显示,但任何类别等都不是。 我的团队中的其他人升级没有任何问题(我只使用默认的下载安装程序) 任何帮助非常感谢,因为目前我基本上只是使用记

How to convert .docx to .pdf in C#

Now we are using OpenXML to read data from database and generate doc. But the final requirement is to be a pdf. So I want to know how to convert .docx to pdf in C#. Could anyone for help? Or provide some information. You can check solutions in this link: http://www.codeproject.com/Questions/346784/How-to-convert-word-document-to-pdf-in-Csharp I recommend using this among solutions as firs

如何在C#中将.docx转换为.pdf

现在我们使用OpenXML从数据库读取数据并生成文档。 但最终的要求是成为pdf。 所以我想知道如何在C#中将.docx转换为pdf。 任何人都可以帮忙吗? 或者提供一些信息。 您可以在此链接中查看解决方案:http://www.codeproject.com/Questions/346784/How-to-convert-word-document-to-pdf-in-Csharp 我建议首先在解决方案中使用它: using System; using System.Collections.Generic; using System.Linq; using System.Web;

LdapConnection vs. PrincipalContext

I have the following two implementations of authenticating users with LDAP and LDAPS and I was wondering which was better / more correct. For the record, both of these work on both SSL and non-SSL connections. I'm also curious because when watching with Wireshark on the Non-SSL PrincipalContext version, I still see traffic on Port 636. Of the four combinations ( Non-SSL LdapConnection , SS

LdapConnection与PrincipalContext

我有以下两种使用LDAP和LDAPS验证用户的实现,我想知道哪个更好/更正确。 为了记录,这两个都可以在SSL和非SSL连接上使用。 我也很好奇,因为在Non-SSL PrincipalContext版本上观看Wireshark时,我仍然可以看到端口636上的流量。在四种组合( Non-SSL LdapConnection , SSL LdapConnection , Non-SSL PrincipalContext , SSL PrincipalContext )中,只有一个在端口389和636上具有流量,而不仅仅是一个或另一个。 什么可

Can't change target platform to "any CPU"

I work on an x86 pc and use .NET4.0 (same probelem with 3.5) in VS2010. When I make a new Project (eg WinFormsApp), the first thing I want to do is to change the target platform of the project/solution to "Any CPU". I do the following: Project Properties -> build -> change TargetPlatform to "Any CPU" On top of the properties page the platform is still "Active

无法将目标平台更改为“任何CPU”

我在x86电脑上工作,并在VS2010中使用.NET4.0(与3.5版本相同的probelem)。 当我创建一个新项目(例如WinFormsApp)时,我想要做的第一件事就是将项目/解决方案的目标平台更改为“任何CPU”。 我做了以下几点: 项目属性 - >编译 - >将TargetPlatform更改为“任何CPU” 在属性页的顶部,平台仍然是“活动(x86)”,所以我这样做 解决方案属性 - > ConfigurationsMgr - > Platform - > new(因为只有x86可

DateTime.TryParseExact won't parse what appears to be a valid date string

This is going to be one of those "I can't believe I didn't think of that" questions, but it's been vexing me for going on two days. I've got bunch of date strings (and many more columns of data) coming out of a .csv file that are in this format: 8/8/2017 8:57 I've read through the SO questions here and here as well as the documentation on MSDN from here and here.

DateTime.TryParseExact不会分析看起来有效的日期字符串

这将是其中一个“我不相信我没有想到这个”的问题,但是让我两天的时间感到困扰。 我从这种格式的.csv文件中获得了一堆日期字符串(以及更多列数据): 8/8/2017 8:57 我已阅读这里和这里的SO问题以及MSDN上的文档。 以下是我在LINQPad的C#语句中尝试过的一些事情,可以从MSDN示例中进行修改: string[] data = { "8/8/2017 8:57,-1.220135,-1.239456,-3.20E-08,-4.47E-09,-1.202865"}; Console.WriteLine(data); string d

Format date string in a specific pattern

I have a to display Date format in this format Tuesday April 17 6:12:02 2018 I have tried this class Program { static void Main(string[] args) { var today = DateTime.Now.AddDays(-1); var day = today.Day; var month = today.Month; var year = today.Year; Console.WriteLine(today); Console.WriteLine(day); Console.WriteLine(month);

以特定模式格式化日期字符串

我有一个以这种格式显示日期格式 星期二4月17日6:12:02 2018 我试过这个 class Program { static void Main(string[] args) { var today = DateTime.Now.AddDays(-1); var day = today.Day; var month = today.Month; var year = today.Year; Console.WriteLine(today); Console.WriteLine(day); Console.WriteLine(month); Console.WriteLine(ye

How do I programm a language independent double.tryparse?

i got string values representing doubles. (fe "1.23"). Always with ".". If you run the code: double dDouble =0; string sDemo ="1.23"; double.TryParse(sDemo,out dDouble)); it will return 1.23 to the dDouble var. If i switch to a different languge with "," as "." .... i get 123.0 as dDouble. How do I ensure that its always 1.23 ... double dDouble

如何编程一个独立于语言的double.tryparse?

我得到了代表双打的字符串值。 (fe“1.23”)。 始终以“。”。 如果你运行代码: double dDouble =0; string sDemo ="1.23"; double.TryParse(sDemo,out dDouble)); 它会返回1.23到dDouble var。 如果我切换到另一个“,”为“”的语言。 ....我得到123.0作为dDouble。 我如何确保它总是1.23 ... double dDouble =0; string sDemo ="1.23"; double.TryParse(sDemo,System.Globalization.NumberStyles.Any, System.G

different results on emulator and windows phone device c#

So i am working on an application that does some calculations. It reads some numbers from a txt, it converts them to double and after it multiplies them it gives the result. Lets say the txt has the numbers 10.5 and 2 string string1 = "10.5", string2 = "2"; double double1 = Convert.ToDouble(string1), double2=Convert.ToDouble(string2); double double3=double1*double2; textbox.text= double3.ToSt

模拟器和Windows Phone设备上的不同结果c#

所以我正在做一些计算的应用程序。 它从txt中读取一些数字,将它们转换为double,并在它们相乘之后给出结果。 可以说txt的数字是10.5和2 string string1 = "10.5", string2 = "2"; double double1 = Convert.ToDouble(string1), double2=Convert.ToDouble(string2); double double3=double1*double2; textbox.text= double3.ToString(); 我总是在模拟器上得到的结果是21,而在我的设备上,我得到了210.我尝试从手机重新安装

DateTime.ToString removes slashes

This question already has an answer here: C# date formatting is losing slash separators 4 answers 你可能需要为你的字符串提供一种文化。 DateTime.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); 逃避斜线: var result = MyDateTime.ToString("dd'/'MM'/'yyyy");

DateTime.ToString删除斜杠

这个问题在这里已经有了答案: C#日期格式正在丢失斜线分隔符4个答案 你可能需要为你的字符串提供一种文化。 DateTime.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); 逃避斜线: var result = MyDateTime.ToString("dd'/'MM'/'yyyy");

Double.Parse cannot keep comma

I'm trying to convert a string into double, I've this value: 53.095 and try to convert into double as: string doub = "53.095"; var cv = Convert.ToDouble(doub); I get: 53095 . Why I doesn't get the comma? What am I missing? I guess it's because different countries handle comma differently. My country, for example uses , instead. So you must be aware of how the string is for

Double.Parse不能保留逗号

我试图将字符串转换为双53.095 ,我有这个值: 53.095并尝试转换为双53.095为: string doub = "53.095"; var cv = Convert.ToDouble(doub); 我得到: 53095 。 为什么我没有得到逗号? 我错过了什么? 我想这是因为不同的国家处理逗号的方式不同。 我的国家,例如使用,来代替。 所以你必须知道字符串是如何格式化的。 string doub = "53.095"; var cv = double.Parse(doub, new CultureInfo("en-GB")); 对于另一个本