This Blog Can Also Be A Hat
Programming Randomness via Matthew Manela
Browse by Tags
All Tags
»
C#
»
Programming
(RSS)
CLR
Downloads
Haskell
LINQ
MSDN Code Gallery
Random Thoughts
SQL CE
Visual Basic
Visual Studio
WHAT!
Windows
WPF
Model Binder
15 December 08 10:45 PM
|
MattManela
|
0 Comments
When working with a multi-tier application I often find myself converting from one of the tiers object models to my own similar (but often different) model. I often write code that would set one by one each property from a web tier object to my
Read More...
SQL CE 3.5 with LINQ to SQL Revisited
26 September 08 08:26 AM
|
MattManela
|
2 Comments
A few days ago I made a post about using SQL CE 3.5 with LINQ to SQL . I described a way to use connection pooling with SQL CE. A gracious blog reader (Mike Brown) pointed out a way I could make my solution much simpler by using the
Read More...
SQL CE 3.5 with LINQ to SQL
09 September 08 02:04 PM
|
MattManela
|
2 Comments
Using LINQ to SQL with SQL CE 3.5 can be a bit of a challenge. First off, the LINQ to SQL Visual Studio designer doesn't support SQL CE so you need to run sqlmetal from the command line to create the object model (or write it by hand). Once
Read More...
CollectionView.DeferRefresh() : My new best friend
28 August 08 02:23 PM
|
MattManela
|
2 Comments
Well, maybe not best friend but its a nice function. When working with bound collections in WPF you often end up dealing with a CollectionView . This is the MSDN documentation description of a CollectionView : You can think of a collection
Read More...
Foreach is Duck Typed!
22 July 08 10:04 AM
|
MattManela
|
5 Comments
I thought I know how the foreach construct worked under the covers. I figured the compiler would check if the type being iterated over implement IEnumerable or IEnumerator. And if so it will call MoveNext and Current to loop over the elements. But then
Read More...
ArgumentNullException vs ArgumentException
28 May 08 09:17 PM
|
MattManela
|
2 Comments
Both ArgumentNullException and ArgumentException have a constructor which takes two strings. One is the name of the parameter (or argument) in question and the other is a string describing the exception. The funny/odd/interesting thing about them is that
Read More...
Intro to LINQ to SQL Optimistic Concurrency
22 May 08 08:40 PM
|
MattManela
|
0 Comments
After some investigation I feel I have a decent understanding on how LINQ to SQL concurrency works. LINQ to SQL uses optimistic concurrency which means that it never takes an exclusive lock on a table. It caches the information you are working with and
Read More...
Closures and Pass by Reference
30 April 08 07:15 PM
|
MattManela
|
5 Comments
What do you think the following code will do? Compile time error Run time error Work fine 1: static void Main( string [] args) 2: { 3: int x = 10; 4: int y = 5; 5: Swap( ref x, ref y); 6: } 7: 8: 9: static void Swap( ref int x, ref int y) 10: { 11: int
Read More...
Lazy Prime Number Sieve in C#
16 March 08 11:28 PM
|
MattManela
|
3 Comments
In my last post I talked about a Stream class for creating efficient lazy lists in C#. In addition, I showed several classic functional methods I ported to C# to be used on the lazy lists. As I mentioned in that post, I will now talk about an example
Read More...
Digging deeper into C# Lazy Lists
14 March 08 11:47 PM
|
MattManela
|
2 Comments
One of the most interesting aspects of the Haskell language is the fact that features lazy evaluation. My interest in lazy evaluation led me to a post on Wes Dyers blog about lazy lists in C#. In his blog post he talks describes how to create a lazy list
Read More...
Useful LINQ Method- GetMemberTypeChain
06 March 08 11:18 PM
|
MattManela
|
1 Comments
Recently, I have been working on a custom LINQ provider in C#. In a later post (when I have more time to write) I will go in depth into what I am worked on and what have I learned about writing a LINQ provider. But for now I will present a simple function
Read More...
Understanding Variable Capturing in C#
01 March 08 11:21 AM
|
MattManela
|
2 Comments
With the addition of anonymous delegates in C# 2.0 and with lambda expressions in C# 3.0 you might have been hearing a lot about variable capturing. This is the mechanism in which the delegate/lambda which was defined inline is able to hold on to any
Read More...
FastSharp - Write it, Execute it
11 February 08 11:30 PM
|
MattManela
|
5 Comments
Last year I wrote this program which I named FastSharp. It is a text editor which lets you compile and run C# code that would normally exist inside a method. The inspiration for this came from getting tired of opening up Visual Studio and creating a project
Read More...
Who would have thunk it?
18 December 07 10:40 PM
|
MattManela
|
1 Comments
I recently read this article about Lazy Computation in C# . What the article discusses is creating lazy evaluation in C#. Lazy evaluation is a key feature of functional languages like Haskell but is not common in imperative languages. It is used in Haskell
Read More...
Did you know.... Generic Methods
16 December 07 11:14 AM
|
MattManela
|
1 Comments
Did you know that you can call a generic method with out supplying the type argument. The C# compiler will fill in the type parameter for you at compile time since the language is strongly typed. static void MyMethod<S>(S myParam) { Console.WriteLine(
Read More...
More Posts
Next page »
Search
Go
This Blog
Home
About
Email
Tags
Applications
ASP .NET
C#
CLR
Codeplex
Comic
Downloads
F#
Funny
Games
Haskell
Internet Explorer
J
JavaScript
JQuery
LINQ
MSDN Code Gallery
PC
Personal
Powershell
pro
Programming
Project Euler
Random Thoughts
Regular Expression
Silverlight
Snippet Designer
SQL CE
Tools
Ubuntu
Visual Basic
Visual Studio
WHAT!
Windows
WPF
XAML
Archives
January 2009 (2)
December 2008 (2)
November 2008 (2)
October 2008 (1)
September 2008 (3)
August 2008 (5)
July 2008 (1)
June 2008 (4)
May 2008 (3)
April 2008 (4)
March 2008 (8)
February 2008 (3)
January 2008 (3)
December 2007 (7)
November 2007 (4)
October 2007 (3)
August 2007 (2)
Sites of Interest
XKCD
Mallory Emerson's Blog
Dori Manela's Blog
Peter Langsam's Blog
Joe Morel's Blog
Technical Blogs
Sara Ford's Blog
Beth Massi's Blog
Syndication
RSS 2.0
Atom 1.0
Farblondzshet