Browsing 7239 questions and answers with Jon Skeet
You don't have to search through a directory to get a FileInfo - you can construct one directly from the full path. It sounds like you just need: var fileInfo = new FileInfo(Path.Combine(folderPath, "InputData.csv")); var lastModified =... more 1/20/2016 9:55:52 PM
In that case, you would use ToLocalTime()... but that's only going to work if the value from the database is already in UTC. If it's in some other time zone, that's a whole different matter :) In many - but not all - cases, storing UTC in... more 1/20/2016 6:37:02 PM
I declare a 2 dimensional bool array of unknown size Well, you declare an array of arrays. It's not a "real" multi-dimensional array - that would be bool[,] myBools. It's worth understanding the difference between jagged arrays (an... more 1/20/2016 5:00:29 PM
It looks like ZuulServlet isn't meant to be used like this. If you look at the source code of what ZuulServlet.service does, it basically hands everything off to a ZuulRunner. It seems to me that you need to be looking into hooking into... more 1/20/2016 3:16:29 PM
It sounds like you don't really want to filter by "important" but order by it: Value = g.OrderByDescending(op => op.Important) // true first .ThenByDescending(op => op.Priority) .First() .Value more 1/20/2016 11:17:16 AM
You need to cast the args to ToolBarItemEventArgs, at which point you can access the ToolBarButton it refers to: var toolBarArgs = (ToolBarItemEventArgs) objArgs; switch (toolBarArgs.ToolBarButton.Text) { ... } However, I would... more 1/20/2016 9:44:39 AM
saj's answer will only work if every customer has a transaction. Instead, it would be better to use a group join starting with Customer, and count the result: var query = from customer in customers join transaction in... more 1/20/2016 9:11:21 AM
I wouldn't start with the SQL... I'd start by thinking of what you're counting, which is basically the number of receipt records in the group which matches the customer. It sounds like you want something like: var query = from customer in... more 1/20/2016 8:16:31 AM
You're asking for the Header element - so that's what it gives you. If you only want the text of that, you can just use: var headerText = doc.Descendants("Header").Single().Value; To find all the body tags, just use a Where clause: var... more 1/19/2016 4:21:54 PM
You're trying to create a Document element not in a namespace, but set the default namespace at the same time. I suspect you just want: String ns = "urn:iso:std:iso:20022:tech:xsd:" + SepaSchemaUtils.SepaSchemaToString(schema); var xml =... more 1/19/2016 4:12:57 PM