Sign In
jaredpar's WebLog
Code, rants and ramblings of a programmer.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Active Object
Anonymous Types
API Design
BclExtras
Blogging
Books
C#
C++
Closures
CLR
CodeDom
Debugging
Developing
DotNet
EESdk
Evil
Exceptions
Expression Evaluator
Extension Methods
F#
Functional
Futures
FxCop
Generics
Gotcha
Humor
IMetaDataImport
Immutable
ISynchronizeInvoke
Lambda
LINQ
LUA
MEF
Misc
Orcas
Patterns
Performance
PInvoke
PowerShell
Rant
RantPack
Refactoring
Regex
Security
SEH
SynchronizationContext
Talks
Templates
Testing
Threading
Tuple
Type Inference
VB
Visual Studio
VsVim
WinForms
Wow64
Browse by Tags
MSDN Blogs
>
jaredpar's WebLog
>
All Tags
>
dotnet
Tagged Content List
Blog Post:
BclExtras Library
JaredPar MSFT
I published a .Net utility library on Code Gallery today called BclExtras . It’s a set of classes meant to be used in addition to the standard .Net base class libraries (BCL). The main focuses of the library are functional programming, multi-threading, LINQ extensions, unit testing and API...
on
23 Jan 2009
Blog Post:
Is IntPtr(long) truncating?
JaredPar MSFT
The short answer is: No, not when it matters A colleague and I were discussing a particular scenario around IntPtr,PInvoke and 64 bit correctness. Eventually our discussion lead us to the IntPtr constructor which takes a long. To my surprise the code for the constructor is the following....
on
28 Oct 2008
Blog Post:
RantPack - A utility library
JaredPar MSFT
I often post code examples, samples and snippets on this blog. Many of these samples are a part of a utility library I've been writing and maintaining for many years now. Essentially since I got involved in DotNet programming. I write a lot of code for internal apps, demos and hobby projects. Having...
on
30 Apr 2008
Blog Post:
IEnumerable and IEnumerable(Of T) 2
JaredPar MSFT
Quick follow up to my earlier post . Fixing this issue in C# is even easier because of the existence of iterators. public static IEnumerable < object > Shim(System.Collections. IEnumerable enumerable) { foreach ( var cur in enumerable) { yield return cur; } }
on
5 Oct 2007
Blog Post:
.Net Framework Source Code
JaredPar MSFT
If you haven't heard the news yet, you can read the full article on ScottGu's Blog . In summary Microsoft has released the source code for the .Net Framework in such a way that you can step into the Framework while debugging. IMHO this is great for users because it allows us to get a lot of insight into...
on
3 Oct 2007
Blog Post:
Closures in VB Part 6: Limitations
JaredPar MSFT
For previous articles in this series please see ... Part 1: Introduction Part 2: Method Calls Part 3: Scope Part 4: Variable Lifetime Part 5: Looping As powerful as closures are in the language they do have a few limitations. We worked hard in Orcas to put as few limitations in Orcas as possible. Below...
on
6 Aug 2007
Blog Post:
Detecting if you are an Admin
JaredPar MSFT
This came up on an internal alias. A customer wanted to know how to determine if there were running as an admin in a tool. Below is a sample program that will print out whether or not you are the machine admin or a member of the machine administrators group. This is essentially the same as the code in...
on
1 Aug 2007
Blog Post:
Coding Quiz: Anonymous Type Types
JaredPar MSFT
Question: How can you create a variable in VB which is typed as an anonymous type but not actually create an instance of that type? Answer in comments. Note, doing this is not particularly useful it came about while I was playing around with a feature a few days ago.
on
1 Aug 2007
Blog Post:
IMetaDataImport::GetParamForMethodIndex
JaredPar MSFT
While investigating a recent bug I found about an interesting return for GetParamForMethodIndex. On a perfectly verifiable assembly, a call to GetParamForMethodIndex was returning a failure code. After some searching I found the return code was CLDB_E_RECORD_NOTFOUND. I was surprised at first because...
on
30 Jul 2007
Blog Post:
Closures in VB Part 5: Looping
JaredPar MSFT
For previous articles in the series please see Part 1: Introduction Part 2: Method Calls Part 3: Scope Part 4: Variable Lifetime Once again sorry for the long delay between posts. Looping structures can cause unintended consequences when used with Lambda expressions. The problem occurs because lambda...
on
26 Jul 2007
Blog Post:
Closures in VB Part 4: Variable Lifetime
JaredPar MSFT
For previous articles in this series please see Part 1: Introduction Part 2: Method Calls Part 3: Scope Sorry for the long delay between posts here. We're getting Orcas out the door and getting this series completed takes a back door to shipping. Originally I wanted to talk about looping structures next...
on
15 Jun 2007
Blog Post:
Closures in VB Part 3: Scope
JaredPar MSFT
For previous articles in this series please see Part 1: Introduction Part 2: Method Calls Thus far in the series we've only lifted variables that are declared in the same block/scope. What happens if we lift variables in different scope? The answer is that one closure class will be created for every...
on
25 May 2007
Blog Post:
Closures in VB Part 2: Method Calls
JaredPar MSFT
For previous articles in this series, please see Part 1 - The basics This part of the series will focus on how method calls are handled in closures. As stated in the previous article, the purpose of closures is to allow all operations inside a lambda or query expression that would normally be available...
on
3 May 2007
Blog Post:
Closures in VB: Part 1
JaredPar MSFT
One of the features I implemented for VB 9.0 is lexical closure support. This a great addition to the VB language and I wanted to do a series of blog posts to describe this feature and how it will impact your code. Lexical Closures (more often referred to as simply Closures) are the underpinnings...
on
27 Apr 2007
Blog Post:
CoSetProxyBlanket and Managed Code
JaredPar MSFT
When running FxCop on any managed code that uses CoSetProxyBlanket you will see an error message saying the method cannot be called reliably from managed code. I've hit that message before was frustrated by my attempts to find an explanation on the web. Part of the reason is I'm not the most efficient...
on
19 Apr 2007
Blog Post:
Debugging Managed Code with Object ID's
JaredPar MSFT
Just found out about a neat way to keep track of managed object references while debugging. Check out this blog entry http://blogs.msdn.com/greggm/archive/2007/01/17/setting-conditional-breakpoints-using-object-ids.aspx
on
18 Apr 2007
Blog Post:
Readonly TextBox that doesn't look funny
JaredPar MSFT
When you make a WinForm TextBox ReadOnly, it aquires a distinctive look because it changes the background. Users often want the appearance of the TextBox to stay the same, they just don't want it to be mutable. Here's a snippet to make a TextBox ReadOnly and not change it's appearance. Dim saved As...
on
12 Feb 2007
Blog Post:
Serialization, understanding the problem
JaredPar MSFT
Writing a proper serialization mechanism is ofter very difficult. The problem is most people don't realize this because it just works in their application and .Net makes it very easy to do. A lot of the problem is not understanding what factors you need to consider when writing a serializer. Failures...
on
29 Jan 2007
Blog Post:
Publishing Web Application Projects via FTP
JaredPar MSFT
Web Application projects are a new project type in Visual Studio 2005 SP1. It almost all of the niceties of the web projects with the semantics of being contained within a class library project. I like the feel of them and do all of my web app development in them now. I just ran into a small problem...
on
26 Jan 2007
Blog Post:
Boolean Parameters
JaredPar MSFT
An item I try to avoid in any API I create are methods which ... Take more than one parameter One of the parameters is a boolean Typically this pattern indicates a True/False option on an operation type. This boolean value turns on or off some type of scenario for that operation. The reason...
on
23 Jan 2007
Blog Post:
Passing data between ASP.Net pages
JaredPar MSFT
When developing an ASP.Net page I tend to pass a lot of data between pages. A lot of it comes from being fairly OO natured and wanting to have a page that displays a particular type of content. There are lots of articles detailing how to pass data between pages that have a 1-1 relationship using the...
on
16 Jan 2007
Blog Post:
Windows Forms Event LifeCycle
JaredPar MSFT
When deveploping windows forms app, it's important to understand the event lifecycle of a form. That way you know what code to put where to ensure it's loaded at the appropriate time. That being said I wrote a small app to detail the events in a basic windows form application. Greater indentations indicate...
on
8 Jan 2007
Blog Post:
Dispose vs Delete
JaredPar MSFT
Programs allocate resources for use during execution. The problem with resources is that they are limited and often times need to be recycled. Languages devise constructs and patterns for developers to periodically free up resources so that their programs can continue running. In Native C++ you typically...
on
14 Dec 2006
Page 1 of 1 (23 items)