Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » FP Tutorial   (RSS)
Sorry, but there are no more tags available to filter with.

Using the Open XML SDK

[Table of Contents] [Next Topic] Open XML Packages To follow this tutorial, you don't need to delve into all of the details of working with packages. This topic presents a small chunk of code that you can use as boilerplate code – it opens a word document
Posted by EricWhite | 0 Comments
Filed under:

Attachment(s): UsingTheOpenXmlSdk.cs

Parsing XML from an Open XML Document

[Table of Contents] [Next Topic] The first problem that we're going to tackle is to retrieve some specific text out of an Open XML Word document. In this word document will be text that has the style of "Code". We want to find all consecutive paragraphs
Posted by EricWhite | 0 Comments
Filed under:

Lazy Evaluation (and in contrast, Eager Evaluation)

[Table of Contents] [Next Topic] One of the most important concepts in LINQ is the notion of lazy evaluation. Without this facility, LINQ would perform very poorly. Query expressions operate on some type that implements IEnumerable<T>. The variable
Posted by EricWhite | 0 Comments
Filed under:

Attachment(s): LazyEvaluation.cs

Query Composition using Functional Programming Techniques in C# 3.0

This is a tutorial on using Functional Programming (FP) techniques for constructing LINQ queries. It is certainly possible to write simple LINQ queries without using these techniques, but as soon as you start writing more complicated queries, you need
Posted by EricWhite | 13 Comments
Filed under:

Complete Listing of ParseWordML

[Table of Contents] [Next Topic] The following code is attached to this page. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Xml; using System.Xml.Linq; using Microsoft.Office.DocumentFormat.OpenXml.Packaging;
Posted by EricWhite | 0 Comments
Filed under:

Attachment(s): ParseWordML.cs

Pure Functions

[Table of Contents] [Next Topic] FP introduces the notion of pure functions/methods. A pure function is one that doesn't affect the state of anything outside of it, nor depends on anything other than the arguments passed to it. Also, given a set of arguments,
Posted by EricWhite | 3 Comments
Filed under:

Programming in a Functional Style

[Table of Contents] [Next Topic] We're now ready to talk more about some of the core FP concepts. Declarative vs. Imperative Code Imperative languages are state based. Object-oriented programming languages such as C#, C++, and Java have extensive capabilities
Posted by EricWhite | 6 Comments
Filed under:

Introduction to the FP Tutorial

[Table of Contents] [Next Topic] Some time ago, I was talking to some members of a team that used LINQ and LINQ to XML in one particular area of their code. They said that the code written using a conventional approach to XML was in the order of 6000
Posted by EricWhite | 2 Comments
Filed under:
 
Page view tracker