Archive for the ‘C#’ Category.

String Stream for .NET

I was working with C++ Standard Template Library (STL) library and when using the StringStream class I felt like we need this for .NET Yes we have a great class StringBuilder but we can’t use it as a Stream (because it is not).
Most of the cryptographic classes works with the stream object. I […]

Expression Trees-Lambdas to CodeDom Conversion

Introduction
Some people are working to make the meta-programming possible. Some says as language oriented programming or domain specific language, but I prefer in general as meta-programming. For years programming languages supported to generate code with the powerful libraries or developers worked just with string concatenations and external linkers.
Nowadays meta-programming is getting more and more important […]

nBloglines .NET Module for Bloglines Web Services

Bloglines is still the only reader that provides an “official API” to make use of their services. I was working on a syndication application and decided to share the .NET Bloglines library that I wrote to use their web services.
Requirements

.NET 3.5 Framework

Quick Reference

public Bloglines(string username, string password)    Member of CodingDay.Bloglines

Default constructor, password is optional […]

RSS Feed Parser in 20 Lines with .NET LINQ

RSS is becoming more and more the face of web. I rarely visit the sites rather visit a bunch of them using an RSS reader. I was working with RSS data and realized how LINQ to XML made easier, elegant  and terse to manipulate XML data. Here is a very naive RSS  parser from RSS […]

C# 3.0 vs. VB 9.0 and XML in the Language

Here is the summary of new language features as mentioned on the “What’s new on ORCAS

C# 3.0 Language Support: This CTP implements all of the C#3.0 language features from the May LINQ CTP including:

Query Expressions

Object and Collection Initializers

Extension Methods

Local Variable Type Inference and Anonymous Types

Lambdas bound to Delegates and Expression trees

Complete design-time support: Intellisense, Formatting, […]

F# Productization and Visual Studio 2008

It has been a long time since I haven’t blogged. Lots of things have happened on my side and on the development world. After finishing the internship at Microsoft Research Cambridge and submitting my thesis, I started to work at European Product Development Center in Dublin. I am very excited to work at Microsoft again. […]

Simple but Elegant, Creating a class from String

Creating a class from a string might be crucial for some very dynamic projects. It’s a single line of code that I wanted to share but I think it has a lot of power.

Simply get the executing assembly and call the GetType method. If your assembly is one of the linked assembly or even a […]

Emulated Managed Windows Pipes with Standard Input and Output

Pipes are around since Unix, Linux and Windows 95. Pipes are a way of communication between two programs. It’s a virtual channel to the process. Normally it is a system function call in the kernel.dll.
A pipe is a one way channel that you can write or read. So to write and read basically we need […]

Reflection for Properties and Fields with DynamicMethod

Lastly I posted about the coolest exception while working with System.Reflection.Dynamicmethod class. I found the solution for my bug, and now it works like a charm. There are two classes for accessing properties or fields, one with the generic implementations and one with object implementation. Using the reflection with dynamicmethod reflection we can get 80% more […]

ImageLabel Control for ASP.NET (Potential CAPTCHA Control)

I posted an article to The Code Project for an image control. The basic idea for developing that is to write e-mail addresses as images using various formatting options on web applications.
Labels are generated as images instead of text, to have more privacy without any configurations and without HttpHandlers
ImageLabel is an ASP.NET web control […]