Reading and querying XML data is good with Link to XML in C#. LINQ to XML provides an in-memory XML programming interface that leverages the .NET Language-Integrated Query (LINQ) Framework.
Reading and querying XML data is good with Link to XML in C#. LINQ to XML provides an in-memory XML programming interface that leverages the .NET Language-Integrated Query (LINQ) Framework.
CsvHelper is a very good library for reading and writing CSV files. It’s really easy for coding and fast for work. You can install it via Nuget in Visual studio or download from the project page in GitHub https://github.com/JoshClose/CsvHelper. (read more...)
Here is the snippet of how to Create Folder in Document Library programmatically using the Object Model. It can be used in console applications for loading documents or timer-jobs.
My code in C# console application used to download an image from web service and store it in SharePoint library. But some why the code always returned an error "(401) Unauthorized". The requested URL has been successfully opened in browser on the same machine.
There is a rather pretty solution how to get all the items from one generic collection (List<T>) which are not presented in the second one.
Usage "Application configuration file" is very good in creating simple applications. It's very good to store in it values like path, string for database connection or something like this. I use it for a long time. But not so long ago I have noticed that Studio highlights string where configuration file used: (read more...)
Using class System.Environment you can get paths of special Windows folders such as Program Files, My Documents and others. The list of available values is stored in enum object Environment.SpecialFolder (Fugure 1).
There's a possibility to create and use .NetFramework class in PowerShell via cmdlet "Add-Type". You should use New-Object cmdlet to instantiate objects.
Generic handlers have an extension .ASHX. It's a good solution to render documents or images for user on server-side after user requests, not web page. Generic Handlers solution (.ashx files) are not directly supported by Visual Studio 2010 for SharePoint projects. But there's a little trick for this.
Source: a lot of money values returned from SQL as strings. For example, "1500312.32", "2382938.12", "283727361.10" etc.
The task: display money values in format "1 500 312.32", "2 382 938.12", "283 727 361.10", etc.