How to get all users and computers in a domain via C#

I was playing around with Active Directory and C# today. I don't pretend to understand anything yet, but you don't need to know anything about Active Directory or LDAP to do stuff against it with C#.

To start with, the classes we're interested in are found in the following namespaces:

System.DirectoryServices;
System.DirectoryServices.ActiveDirectory;

Continue reading "How to get all users and computers in a domain via C#"

TextInfo: ToTitleCase, ToLower, ToUpper

ToTitleCase(), ToLower(), ToUpper() results

I was poking around the .NET framework yesterday and came across these three methods in the TextInfo class:

string text = "this is a test string";

System.Globalization.TextInfo info = new System.Globalization.CultureInfo("en-US", false).TextInfo;

// First letter of every word is capitalized.
System.Console.WriteLine(info.ToTitleCase(text));

// Lowercase all letters
// System.Console.WriteLine(info.ToLower(text));

// Uppercase all letters
// System.Console.WriteLine(info.ToUpper(text));

info = new System.Globalization.CultureInfo("de-DE", false).TextInfo;

System.Console.ReadLine();

Nice. :-)

Blockwriter 1.0 Beta

Yes! The last of the modifications I wanted to make for 1.0 are done. The squashing of known bugs also went well (the undead screen now minimizes along with the text editor. The text editor's scroll position stays put. And the user is prompted to save the file when there are unsaved changes).

So: download Blockwriter and let me know what you think!

Translate colors

Go from html (hex) colors to argb and vice versa.

Continue reading "Translate colors"

Pinging Technorati Programmatically

Technorati's Response

Ping Technorati from your .NET application.

Continue reading "Pinging Technorati Programmatically"

One Folder to rule them all

How to recursively copy files from a source directory to a destination directory. Useful when the folders you want to peruse are hidden under, say, thirty inner folders.

Java 'phoneMe' source directory structure: phoneME_feature\jsr120\src\core\common\classes\com\sun\midp\wma

Continue reading "One Folder to rule them all"

T newObject = new T();

How to easily create new "T-typed objects" in your generic classes.

Continue reading "T newObject = new T();"

Blockwriter, the greatest typewriter of all times

Blockwriter screenshot

Blockwriter is a simple text editor that simulates a typewriter. Based on Khoi Vinh's excellent Blockwriter write-up.

Continue reading "Blockwriter, the greatest typewriter of all times"

1 of 6 pages  1 2 3 >  Last »

On the Side