I have the following line: orderBaseData.Single(o => o.Id == order.Id).OrderMessages.Count; I want to filter this a bit more. Each OrderMessage has a variable called hideFromUser, and I want to get the count of the OrderMessages where this is set to
So, I am using CookComputings XMLRPC library to be able to talk to InfusionSoft (it's an online CRM that's quite popular). The main method is: [XmlRpcMethod("DataService.query")] IEnumerable<object> QuerySubscriptionStatus(string apiKey, s
I want to display a ToolTip message below a TextBox, but also want them to be right aligned. I was able to position the ToolTip message at the right edge of the textbox, so I tried to move the message left by message length. So I tried to get the str
migrating my web app from ASP.NET Core RC1 to RC2. I'm trying to load my referenced class libraries. This code snippet doesn't work with RC2 anymore. public class Startup { public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILogg
I want my cake and to eat it. I like the way Lists in C# dynamically expand when you go beyond the initial capacity of the array. However this is not enough. I want to be able to do something like this: int[] n = new int[]; // Note how I'm NOT defini
I maintain a legacy application and have a request to add a feature.I have a listbox showing some items. When the Itemssource is changed, I want the listbox to scroll to the top. To do this I have subscriped to the event: private bool handlerAdded =
I'm using "Simple MVVM Toolkit" (MVVM noob here) to develop a C# WPF app. I have a model class called A: public class A : ModelBase<A> { //properties, constructors, methods.. } ..and another model class called B which inherits from A but e
I have a single Crystal Report that I am trying to run via a web site using a Report Viewer and also (using the same .rpt) via a background process that would generate the report straight to a stream or file using the export options. I am not using a
When I try to parse date like this: DateTime t1 = DateTime.ParseExact("August 11, 2013, 11:00:00 PM", "MMMM dd, yyyy, hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture); It works correctly but when I do thing like this :
I want to format a ms value to a "minutes:seconds" value of two digits, by two digits I mean "00:00" but what I get is "0:0". This is an example: I want to show "02:04" instead "2:4" This is my code: Label
{unknown string} {unknown string unknown string} unknown string How do I come up with a regex that recognizes just the string (which is unknown, so I cannot do an explicit match to a specific string) in all four of the above cases?You haven't tried m
I am working with Images in Java, I have designed more over 100+ images(.png) format, They were all Trasparent and Black Color Drawing. The problem is, Now I have been asked to change the color of the Drawing (Black -to ). I have searched many code s
In case my ViewModel has some child property: public class MyViewModel { public MyFormViewModel Form {get;set;} } and I render a form for this property, I can then have the following ActionResult: [HttpPost] public ActionResult SomeAction(MyFormViewM
What is the best way to implement collection of items, where: each item could be of different type each item will raise PropertyChanged event on its change (parent class implements INotifyPropertyChanged) Update: I'm thinking on something like this:
I'm creating a console application in C# to which, at execution, it is passed a bunch of data. Three of them are short strings, such as username, password, etc. However, one of them is a rather lengthy XML document. How long can the strings be, when
Normally I try to stay well clear of DataSets and DataTables, but we currently have a requirement where it seems to make sense to use them. I'm having some problems serializing a DataTable when the DataColumn name contains a space and the type of the
I'm interested in metaprogramming examples written in F# that demonstrate the use of F#-specific functionality such as the TryGetReflectedDefinition function in the F# standard library. Where might I find such examples?WebSharper and Unquote are two
I'm just new in wpf and am planning to use a listbox to generate recently opened or closed items. Everytime a file is opened, it gets added permanently added into a resource dictionary of type listbox item. On the other hand, besides the listbox item
I am Creating a txt file in.Net with the help of below code. StreamWriter writerVer = new StreamWriter(@"c:\Version.txt"); writerVer.WriteLine("Version : " + Context.Parameters["ver"]); File.SetAttributes(@"C:\Version.tx
I have the following rewrite rule: <rewrite url="^/Membership/(.+)/(.+)/(.+)/(.+)" to="/Membership/Index.aspx?parentf=$3&f=$4"/> which I am expecting should work with this URL: /Membership/Benefits/Member-Groups/Sub-Groups/Mo
I'm writing WCF service and his client. I want to send/receive objects of my custom classes, between service and client. I have 3 modules WCF service WCF client common class library Both WCF service and client have references to common class library.
I've comp up against a formidable conundrum. Here's my situation: I'm building an application with a plugin framework. There's a base plugin class that all plugins must extend. Within the same same assembly I have a helper class that will serialize a
Does anybody know of any good and free statistics libraries for .Net? I am working on calculating T-Tests, which I have written a formula to calculate, although now I need a formula for the p-value, which is a little more complex, and not being a sta
Class A { } Class B : A { } B ItemB = new B(); A ItemA = (A)B; Console.WriteLine(ItemA.GetType().FullName); Is it possible to do something like above and have the compiler print out type A instead of type B. Basically, is it possible to permanently c
I remember when .NET 4 was in beta there was a video of a developer that made a command-line app that he could type C# code into and it would compile the code on the fly. The idea was that the compiler was now available in the .NET language. Anyone r
I have a SL 3.0 xap I want to host in a ASP.NET website, I have access to the XAP file and I have created a HTML page to host the SL component. When I access the page all I see is a white screen where the SL component should be, SL is loaded but the
UPDATE: I am not clear in what context AOP should be used? As we can use AOP for logging purpose, security(Authentication), please suggest some other scenarios where we can take benefit of AOP. Can AOP be used to share data among different running th
I am performing a code review (VS2008/.NET 3.5). The development team has created several data access components in a DAC assembly. I encountered a business proces assembly where every DAC is wrapped with a business component with no additional value
Is there a clever way to determine which field is causing 'string or binary data would be truncated' with LINQ. I've always ended up doing it manually by stepping through a debugger, but with a batch using 'SubmitChanges' I have to change my code to
This is probably best shown with an example. I have an enum with attributes: public enum MyEnum { [CustomInfo("This is a custom attrib")] None = 0, [CustomInfo("This is another attrib")] ValueA, [CustomInfo("This has an extra flag