Tag: C#的

将ZPL发送到Zebra打印机的.NET代码

有没有办法将ZPL(斑马编程语言)发送到.NET打印机? 我有代码在Delphi中这样做,但它不是很漂亮,我宁愿不尝试在.NET中重新创build它,因为它是。

什么是“长”? 数据types?

我正在阅读另一个开发人员编写的代码,不知道多long? 手段: protected string AccountToLogin(long? id) { string loginName = ""; if (id.HasValue) { try {….

我如何testing负零?

最初,我认为Math.Sign将是正确的路线,但在运行testing后,似乎将-0.0和+0.0视为相同。

如何在XAML页面之间传递值(参数)?

以前也有类似的问题,但是这个问题试图探索更多的select和传递复杂对象的能力。 问题是如何传递参数,但它确实需要分成三部分。 在XAML应用程序的页面之间导航时,如何传递参数? 使用Uri导航和手动导航有什么区别? 使用Uri导航时,如何传递对象(不只是string)? Uri导航的例子 page.NavigationService.Navigate(new Uri("/Views/Page.xaml", UriKind.Relative)); 手动导航示例 page.NavigationService.Navigate(new Page()); 这个问题的答案适用于WP7,silverlight,WPF和Windows 8。 注意:Silverlight和Windows8是有区别的 Windows Phone:页面被导航到使用Uri,数据作为查询string或实例传递 Windows 8 :通过传递types和参数作为对象来导航页面

DataSet不支持导出中的System.Nullable <>

我正在尝试使用导出为Excell,PDF,TextFile生成报告。 那么我在MVC做这个。 我有一个名为SPBatch的类(这是我的SQL中的存储过程的确切名称),它包含以下内容: public string BatchNo { get; set; } public string ProviderName { get; set; } public Nullable<System.Int32> NoOfClaims { get; set; } public Nullable<System.Int32> TotalNoOfClaims { get; set; } public Nullable<System.Decimal> TotalBilled { get; set; } public Nullable<System.Decimal> TotalInputtedBill { get; set; } public Nullable<System.DateTime> DateCreated { get; set; } public Nullable<System.DateTime> DateSubmitted […]

有没有一种内置的方式将IEnumerator转换为IEnumerable

有没有一种内置的方式将IEnumerator<T>转换为IEnumerable<T> ?

VB到C#函数

从VB.Net到C#的下列运算符是什么? UBound函数() LBOUND() 没什么() CHR() LEN() 用Ucase() LCASE() 剩下() 对() RTRIM() LTRIM() 修剪() 中() 更换() 分裂() join() MSGBOX() IIF()

非法令牌右侧::

我有以下模板声明: template <typename T> void IterTable(int& rIdx, std::vector<double>& rVarVector, const std::vector<T>& aTable, const T aValue, T aLowerBound = -(std::numeric_limits<T>::max()), //illegal token on right side of '::' shows here bool aLeftOpen = true) const; 如上所述,在“ – (std :: numeric_limits :: max())”的行上抛出非法令牌错误。 我从一些旧的linux源代码中得到了这个代码,我试图在Windows上编译它。 任何想法是什么问题? 编辑:它也失败了使用min(),编译器输出是: Error 92 error C2589: '::' : illegal token on right side of […]

是一个linq查询ConcurrentDictionary值线程安全吗?

让我们说我有以下代码: ConcurrentDictionary<long, long> myDict= new ConcurrentDictionary<long, long>(); 通常每个按键的访问都是线程安全的,但也是以下linq查询线程安全? 我还没有在文档中find任何内容: http : //msdn.microsoft.com/en-us/library/dd287226.aspx if myDict.Values.Any(x => !x.HasPaid)) { return false }

我在哪里可以findSystem.Linq.Dynamic dll?

我正在寻找这个DLL,但无法find它在任何地方? 任何人都知道在哪里得到它,可以帮助我? 谢谢!