C# & .NET Tutorials
General C# code examples
Besides surviving countless beatings from my favorite two year old and a two hour crying fit from my 4 month old son I’ve attended several great community events. Thanks wifey :). May 3rd: Oklahoma City Developers Group: Stop Drowning In Technical Debt! As the INETA Membership Mentor of Oklahoma I set a goal this year to try and encourage more collaboration between the strong communities existing in Tulsa and Oklahoma City. To accomplish this I have presented three times so far in OKC. On May 3rd I presented to a crowd of about 50 for the lunch meeting and...
Tulsa Developers User Group | Automated Web Testing with Visual Studio 2008 (Review) Corey Roth presented tonight on automated web testing with Visual Studio 2008 at the Tulsa Developers User Group. Visual Studio can be used to record an action such as logging into a web application. Alternatively, users can inspect screen values for specific results. The test would pass if the expect value is present and fail if the value is missing. Visual Studio must be installed to execute the tests. A tests project actually generates .NET Code (C# or VB.NET). The tool can also be...
Regular Expression are quite power especially for validation purposes. Classic examples include password and email validation. However, regular expressions are usually something developers get to work then forget about. I don't work with regular expression everyday so I don't bother memorizing the syntax. So when I do need to use a regular expression in code I usually end up searching the web for an example.
A coworker here at SpringPoint Technologies turned me on to Expresso, a free regular expressions authoring tool.
Technorati Tags: Regular Expressions,Expresso
SPWeb.Groups and SPWeb.SiteGroups
WSS 3.0 deprecates the site group concept used in WSS 2.0. As a result manipulating groups and security objects through the object model can be less than obvious.
For Example, a developer may try to add a group to a sub site (SPWeb) using this syntax SPWeb.Groups.Add(Group Name). However, in WSS 3.0 and MOSS 2007 this code will result in the following error:
“You cannot add a group directly to the Groups collection. You can add a group to the SiteGroups collection.”
To resolve this error and create a group use the following object model syntax: SPWeb.SiteGroups.Add(). This...
I want to thank everyone who attended my session on Saturday. I had been sick all week and was still feeling quite run down but we had some great discussions. Office Business Applications (OBA) are really an excited way to look at developing or extending line-of-business applications. As promised here are my slides and some important OBA links.Download Tamp 2007 Code Camp OBA PresentationSupply Chain Management OBA Reference PackLoan Origination Reference Pack
Recursion is a computer science concept in which a method / function essentially calls itself until some condition is met. Recursion can be an elegant solution to some logic problems. However, I believe there are some potential dangers in using recursion that should carefully be consider. Recursion is not an impossible concept to grasp it is just one that takes some thought. The skill level of those maintaining an application should be considered before implementing recursion as it is a more advanced programming concept and could lead to serious performance issues of not implement correctly. namespace RecursionTest
The following conversation is a conversation with Microsoft Financial Services Sr. Architect Colin Cole discussing Office Business Applications (OBA). This is a new type of blog post for me and a Drowning In Technical Debt first. I hope to conduct similar conversations in the future. Finally, I would like to thank Colin for making time to have this conversation with me.dbottjer says: So I figured a good place to start would be with a definition. What is OBA? I did some research and here is what I came up with. Office Business Applications (OBA) use the Microsoft Office Suite of...
We've been using the Composite Application Block (CAB) and Smart Client Software Factory (SCSF) since they first emerged. Most of my focus has been on the middle tier and service layer which our smart client front ends consume. However, recently we have needed more manpower building smartparts. As result I've been refreshing my knowledge of the CAB and SCSF. I found found a great blog series http://geekswithblogs.net/kobush/category/3702.aspx on understanding the cab. The series does a great job defining the CAB terminology and explaining the basic architecture.
DoNotExposeGenericLists is a Code Analysis rule exposed within Visual Studio when List<T> is publically exposed. For example, List<T> may be exposed through properties, methods, parameters, etc. Why does DoNotExposeGenericLists recommend that I expose Collection instead of List? [David Kean] explains that Collection<T> is the better choice b/c it exposes 4 overidable methods. The methods are ClearItems, InsertItem, RemoveItem and SetItem. Events can be raised from within these four methods to provide a notification when changes are made to the Collection.
[Dave] copied me on an email a few months back from a colleauge regarding the FailFast method. This method was added to the .NET 2.0 framework and basically terminates a process without executing the any application Try-Finally or finalizer code. Additionally, this method creates a memory dump for your application and writes a log entry to the Windows Application Event Log.
Full C# & .NET Tutorials Archive