Sign in
David Kline
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Announcements
Books
Command Line
Configuration
Debugging
Diagnostics
Events
GUI
Networking && Web Services
P/Invoke
Performance
Quick Tips
Reflection
Testing
Tips and Tricks
Windows Communication Foundation
XML
Browse by Tags
MSDN Blogs
>
David Kline
>
All Tags
>
tips and tricks
Tagged Content List
Blog Post:
Presentation tip: Showing code
DavidKlineMS
Since MEDC 2005, I have been tapped to present sessions many times. Over the past three years, I have learned a lot and have grown as a presenter. When I was first getting started, I attended my first speaker training course. Speaker training is a one-on-one class where you meet with your...
on
22 Dec 2007
Blog Post:
Quick Tip: Add files to Visual Studio projects the easy way
DavidKlineMS
Here's another in my series of "why didn't I know this feature was there". While I was doing a technical review last week, I learned about a much easier way to add files to my Visual Studio projects. In the solution explorer Select a project Click the "Show all files" button Right...
on
18 Dec 2007
Blog Post:
Quick Tip: Debugging Smart Device Unit Tests
DavidKlineMS
While browsing MSDN today, I came upon a handy article that I wanted to share. Titled 'How to: Debug while Running a Smart Device Unit Test ', it provides step by step instructions on debugging your test projects. There is one additional step I would like to add to those listed in the article...
on
12 Nov 2007
Blog Post:
Quick Tip: Getting the Collection of Checked ListView Items
DavidKlineMS
Have you ever created a ListView control and wanted to get the collection of items that the user has checked? While I was working on my demo for MEDC, that was one of the things that I needed to be able to do. If I were writing my application for the .NET Framework, I would get the collection of items...
on
18 Jun 2007
Blog Post:
Quick Tip: Using XPath to find nodes by attribute value
DavidKlineMS
There are some things that I can just remember: phone numbers, locker combinations, and the like. There are others that I have to lookup again and again and again. XPath query syntax is one of the latter items. Today, I'd like to talk a little about XPath queries. The following XML contains a collection...
on
13 Mar 2007
Blog Post:
No ParameterizedThreadStart? No problem.
DavidKlineMS
The .NET Compact Framework is a subset of the .NET Framework. As such, there are features and functionality that exist in the .NET Framework that do not in the .NET Compact Framework. One such feature is ParameterizedThreadStart. If your ThreadStart delegate needs data provided by the caller you can...
on
26 Jan 2007
Blog Post:
Quick Tip: Identifing the interfaces that an object implements
DavidKlineMS
Have you ever wondered what type an object is? How about what interfaces the object implements? Using the .NET Framework and .NET Compact Framework, this information is very easy to determine. The first thing we need to know about an object is it's type. Every object, including Object, has a method called...
on
5 Dec 2006
Blog Post:
Quick Tip - Sharing code between multiple projects in Visual Studio 2005
DavidKlineMS
I have long been an advocate for putting common code into an assembly that is shared by applications needing the functionality. That said, there are times where the separate assembly approach is not appropriate. For those situations, today's tip may help make code sharing easier. I have a project (called...
on
29 Nov 2006
Blog Post:
Quick Tip: Specifying a field's name when using the XmlSerializer
DavidKlineMS
Last month, I wrote about how to instruct the XmlSerializer to create an XML attribute for fields in an object . Today, I'd like to talk about how to specify the name used to represent a field in the resulting XML. By default, when an object is serialized, fields are serialized into nodes with names...
on
8 Nov 2006
Blog Post:
'const' vs 'static readonly'
DavidKlineMS
I'm a big fan of reusing code whenever and wherever possible. A long time ago, I wrote an assembly that provided common methods and data to some applications I was writing. When I first wrote the assembly, I exposedthe common data as public fields decorated with the const keyword, as shown in the example...
on
27 Oct 2006
Blog Post:
Is it a field or a property?
DavidKlineMS
I very much value code reviews , as long time readers can attest. During these reviews, I have often found myself wondering whether a given line references a field or a property. When reading isolated portions of code, properties can be easily mistaken for fields. Player player = new Player("Someone...
on
13 Oct 2006
Blog Post:
Separating Application Logic and Data Presentation layers
DavidKlineMS
I'm a big advocate of separating an application's logic from it's user interface. By keeping the logic separate from the data presentation layer (UI), it becomes easy to swap out either component with minimal impact on the other. In addition to ease of replacing components, keeping the user interface...
on
5 Oct 2006
Blog Post:
Quick Tip: Serializing an Object Field as an XML Attribute
DavidKlineMS
The addition of the XML Serializer is one of the reasons I really love version 2 of the .NET Compact Framework. I use the XML Serializer in very nearly every application I write; to save application state, data files, etc. By default, the XML Serializer will create a child node for every field in a type...
on
2 Oct 2006
Blog Post:
Quick tip: Filtering input to a TextBox control
DavidKlineMS
Sometimes, it's the little things that take the longest to work out, so I thought I'd start a "Quick tips" series. Quick tips are intended to be short and solve a very specific issue. I was talking with Mark Prentice today and we were looking at filtering a TextBox control so that it only accepted numeric...
on
25 Sep 2006
Blog Post:
Command Line Debugging Revisited - Part 5: The X Command
DavidKlineMS
In the previous installment, I talked about attaching to running processes using MDbg . As part of that discussion, I used the X command. Today, I'd like to spend a little time on X . The X command is one of those great features of MDbg that I think is worth the price of admission by itself. From MDbg...
on
13 Sep 2006
Blog Post:
Using the .NET Compact Framework Remote Performance Monitor to Configure Diagnostic Options
DavidKlineMS
Diagnostic, performance and debugging tools are very cool. The more tools available, the easier it tends to be to find and fix application issues. With Visual Studio 2005, several handy tools were added. I use the Remote Registry Editor and Remote File Viewer just about every day. Version 2 of the .NET...
on
31 Aug 2006
Blog Post:
The Error Log: A New Diagnostic in .NET Compact Framework v2 Service Pack 1
DavidKlineMS
The recent release of Service Pack 1 for the .NET Compact Framework version 2 has added some very useful diagnostic tools. You may have already read about the .NET Compact Framework Remote Performance Monitor , and have hopefully used it to analyze the performance characteristics of your applications...
on
17 Aug 2006
Blog Post:
Command Line Debugging Revisited - Part 1: Getting started with MDbg and .NET Compact Framework Version 2 Service Pack 1
DavidKlineMS
It's been a while since I last wrote about using the command line debugger (cordbg) with the .NET Compact Framework. Quite a bit has changed in the world of .NET Compact Framework command line debugging since that time. With the release, last year, of version 2 of the .NET Framework SDK, a new command...
on
13 Jul 2006
Blog Post:
Using .stat Files with the .NET Compact Framework Remote Performance Monitor
DavidKlineMS
Steven Pratschner recently posted about one of the coolest new features of the Service Pack 1 beta for .NET Compact Framework version 2 -- the .NET Compact Framework Remote Performance Monitor. Along with the real-time view of the .NET Compact Framework performance statistics, the Remote Performance...
on
25 May 2006
Blog Post:
Easier Linked Lists: A real world application of code reviews
DavidKlineMS
Last year, I recommended that everyone read Steve Maguire's Writing Solid Code . Today, I was reminded why I made that recommendation. I have been working on a native (C/C++) application recently and decided that my logging code would be best served by a linked list. During the code review , it was pointed...
on
25 Apr 2006
Blog Post:
Programmatically Rotating the Screen using the .NET Compact Framework
DavidKlineMS
Several months back, I wrote about how to determine whether or not a device supported screen rotation . This post prompted the question of how to programmatically rotate the device.. The snippets below check the device's current display orientation. If portrait (Angle0), the orientation is changed to...
on
17 Apr 2006
Blog Post:
Determining the type of a device at runtime II: A single binary solution
DavidKlineMS
Recently, I wrote about a mechanism to identify the type of device on which your application is running. My original solution utilized a custom unmanaged function to provide a simplified, type safe way to call the SystemParametersInfo function. Some of the folks here commented that, while my method worked...
on
30 Mar 2006
Blog Post:
The Importance of Debugger Symbols: or Reloading Symbols while Debugging
DavidKlineMS
Have you ever attached to a managed application and been greeted with the following message ... No symbols are loaded for any call stack frame. The source code cannot be displayed. ... and found that breakpoints could not be set, or that single step attempts cause the application to run to completion...
on
15 Mar 2006
Blog Post:
Why do I get a NotSupportedException when updating a TextBox?
DavidKlineMS
Have you ever been working on an application and found that when the code tries to update the Text property of a TextBox control that you encounter a NotSupportedException? Have you seen this with a Label, ListBox, Button or another control? If you have, the application is attempting to update the control...
on
10 Mar 2006
Blog Post:
Determining the type of a device at runtime
DavidKlineMS
There are times when it is useful for an application to know on what type of device it is running. An application may wish to modify it's user interface depending on device type (suppress button controls on SmartPhone devices, for example), or may be part of a test harness and have a need to log the...
on
28 Feb 2006
Page 1 of 3 (73 items)
1
2
3