Quantcast
Channel: dev.Bratched [en] » .NET
Browsing latest articles
Browse All 28 View Live

Fun with matrix multiplication and unsafe code

In this post I will compare two methods that perform matrix multiplication. We start by defining the Matrix class: class Matrix { private readonly double[,] _matrix; public Matrix(int dim1, int dim2) {...

View Article



Playing with FindFirstFile and FindNextFile

Enumerating files in .NET is easy. Everybody knows the GetFiles method and you may be tempted to write code like this : var files = Directory.GetFiles(@"c:\windows\system32", "*.dll"); foreach (var...

View Article

Image may be NSFW.
Clik here to view.

How we do ASP.NET MVC

Sample MVC Solution In this post I will show a sample ASP.NET MVC 2.0 project structure illustrating different concepts such as data access, user input validation and mapping between the domain and the...

View Article

Transactional NTFS (part 1/2)

Transactional NTFS and DotNet Starting from Windows Vista and Windows Server 2008, Microsoft introduced a great new feature called Transactional NTFS (TxF). It allows developers to write file I/O...

View Article

Dynamic methods in .NET

Using reflection to invoke methods which are not known at compile time might be problematic in performance critical applications. It is roughly 2.5-3.0 times slower than direct method calls. Here’s a...

View Article


LINQ to XML and reading large XML files

LINQ to XML makes it relatively easy to read and query XML files. For example consider the following XML file: <xml version="1.0" encoding="utf-8" ?> <users> <user name="User1"...

View Article

Uploading multiple files with C#

Have you ever been in a situation where you needed to upload multiple files to a remote host and pass additional parameters in the request? Unfortunately there’s nothing in the BCL that allows us to...

View Article

What features would you like to see in ASP.NET MVC 4?

If there was a single feature I would like to see in ASP.NET MVC 4 that would be to remove/deprecate ViewBag/ViewData. Those two constructs lead to very ugly code in the views and should be avoided....

View Article


Image may be NSFW.
Clik here to view.

How to convert XHTML to PDF in C#

  In this blog post I will illustrate how you could convert an XHTML page into PDF using the flying-saucer library. This is a Java library so we need to first step would be to convert it to a .NET...

View Article


Sample ASP.Net MVC project (updated)

I’ve updated the sample MVC project I wrote for using ASP.NET MVC 3 and the Razor view engine. A minor change is that I no longer use the FluentValidationModelValidatorProvider but the standard one. So...

View Article

Image may be NSFW.
Clik here to view.

Visual Studio versions for your Windows Phone Apps?

Windows Phone 7.x, 8.0 and 8.1 3 major versions of Windows Phone exist since April: 7.x, 8 and 8.1. The 8.1 version allows among others to create ‘classic’ Windows Phone 8.1 applications called 8.1 –...

View Article

Slow HTTP requests in .NET

When profiling a web application I have noticed constant delays of about 200ms on some HTTP calls it was making to an external API. Both the web application and the API were on the same network segment...

View Article

Image may be NSFW.
Clik here to view.

Sharing of source code in Windows and Windows Phone projects

The Portable Class Library (PCL) The portable Class library (PCL) will allow us to share a large part of the code across projects. It is possible for a few years to share the PCL code between projects...

View Article


Image may be NSFW.
Clik here to view.

HTTP and images in Windows Phone

I continue to explore different techniques of displaying images in Windows Phone and this time I will show some possible implementations of fetching them from the web using the HTTP protocol. Classic...

View Article
Browsing latest articles
Browse All 28 View Live




Latest Images