Browse by Tags
All Tags »
Code Snippets (
RSS)
Following my blog about Generic Delegates and Anonymous Methods , here is more: Generics and anonymous methods can make code a lot more flexible. Following I show different ways to accumulate the balance of Account objects. The Account class is a simple...
Depending on the .NET language more or less of implementing resource management with the interface IDisposable and the finalizer is hidden. Interestingly, with VB nothing is hidden - however all the code is created automatically with Visual Studio 2005...
With my previous post about Instantiating Managed Objects with C++/CLI you could read about using ref types two different ways: with local variables and with a handle. Now I'm adding implementing the IDisposable interface with the Test class: ref class...
C++/CLI (not Beta 1) allows declaring reference types as local variables. Let's start with this simple ref class: ref class Test { public: void Foo() { Console::WriteLine("Foo"); } }; Handles and the gcnew operator can be used to create instances: Test...
With my last blog about creating Word documents with XSLT I've shown an example to do a very simple document. Here I'm showing how to create a table using Word. The same XML file as before is used: <?xml version="1.0" encoding="utf-8" ?> <Courses>...
The XML Editor of Visual Studio 2005 shows the elements that are allowed according to the XML Schema. The editor not only shows the elements and attributes that are possible where the cursor is positioned, it also shows some documentation about the elements...
Using the Office Schemas it is easy to create Microsoft Word 2003 documents. Let's start with this XML document: <?xml version="1.0" encoding="utf-8" ?> <Courses> <Course Number="MS-2524"> <Title>XML Web Services Programming<...
I've received a question how to convert multiple XML elements to a values for a single attribute. Here is the information about how this can be done with XSLT. The XML source: <Article> <Head> <Title>.NET Enterprise Services</Title>...
Memi Lavi writes about inherits vs. implements in C# , and that the difference gets much more obvious with VB. He also talks about multiple inheritance with interfaces is not possible. Mostly I'm writing my programs with C# (sometimes C++ and VB). Now...
.NET 2 has new factories that makes it easier to write data-programs independent of the databsae. With .NET 1.0, we could program independent of the database using interfaces: IDbConnection connection = new SqlConnection(connectionString); IDbCommand...
More Posts
Next page »