Kathy Kam hat einige vermutlich relativ unbekannte Parameter für die String-Formatierung mit .NET veröffentlicht. Prädikat lesenswert ;-)
Currently rated 1.8 by 15 people
- Currently 1.8/5 Stars.
- 1
- 2
- 3
- 4
- 5
Microsoft (bzw. Bernd Marquardt) veranstaltet ab 03.04.2006 eine zehnteilige Webcast-Serie zu C# für Ein- und Umstieger.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
The PDC announcements fireworks continuous:
- Microsoft Codename Max: With just a few clicks, you can create lists of your favorite photos, arrange them in the layout of your choice, and express them in beautiful views. Preview your photo lists as you build them until your presentation is perfect. You can even use our super hot 3D Mantle View™ to really show off your work!

- C# 3.0 Language Enhancements introduces several language extensions that build on C# 2.0 to support the creation and use of higher-order, functional-style class libraries. The extensions enable construction of compositional APIs that have equal expressive power of query languages in domains such as relational databases and XML. Get more information, and try hands-on labs here.
- The LINQ Project is a codename for a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
VB.NET and C# Comparison
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
In den letzten Tagen haben sich einige Snippets angesammelt. Hier z.B. die Konvertierung eines strings in ein byte[]:
// string nach byte[] konvertieren.
// Das Default Encoding wird benötigt, damit Umlaute korrekt übernommen werden.
public static byte[] StringToByteArray(string str) {
System.Text.Encoding encoding = System.Text.Encoding.Default;
return encoding.GetBytes(str);
}
Und hier die Konvertierung eines byte[] in einen string:
// byte[] nach string konvertieren.
// Das Default Encoding wird benötigt, damit die Umlaute korrekt übernommen werden.
public static string ByteArrayToString(byte[] bytes) {
string str;
System.Text.Encoding encoding = System.Text.Encoding.Default;
return encoding.GetString(bytes);
}
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Das Resultat von ArrayList.ToArray() liefert immer ein object[] zurück.
Benötigt man hingegen ein typisiertes Array, z.B. int[], muß man das object[] wie folgt casten:
int[] numbers = (int[])myArrayList.ToArray(typeof(int));
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Nachdem ich mich nun zum x-ten Mal über das umständliche Handling der Split-Methode geärgert habe, habe ich sie mir in eine kleine Klasse verpackt:
using System;
namespace MyPersonal.Utils
{
/// <summary>
/// Zusammenfassung für StringHelper.
/// </summary>
public class StringHelper
{
public static string [] Split(string Words, string Delimiter) {
char [] delimiter = Delimiter.ToCharArray();
string [] split = null;
split = Words.Split(delimiter);
return split;
}
}
}
Aufruf:
string [] words = StringHelper.Split("Eins,Zwei,Drei",",");
Auflösung siehe Kommentare - stellt sich die Frage, was ich heute morgen gedacht habe ;-)
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Tim Stall hat bei 4GuysFromRolla mit seinem Artikel "Understanding Interfaces and Their Usefulness" eine Einführung in Interfaces veröffentlicht.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Wer auf der Suche nach einem Einstieg in C# bzw. einer Kurzreferenz für C# ist, wird hier fündig.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Events and Delegates simplified - This article shows you how to design events for your classes.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5