Metah - A Web Technologist Adventure

Tweets

Synchronous and Asynchronous use of Delegate with C#

January 18th, 2010 at 1:25 pm by Ahmet Gyger

Tags: , ,
Posted in CSharp, Microsoft, Tutorials



 For developers the quality of a program can be often express in the time used to finish the computation. With current multicore processor we have to move our thinking from a serial execution to a concurrent execution. Using delegates in an asynchronous way can force the CLR to allocate multiple threads to your computation.
In below [...]

Get Arguments array from CmdLine of a WPF Application.

December 18th, 2009 at 6:24 pm by Ahmet Gyger

Tags: ,
Posted in CSharp, Microsoft, Tutorials



 
This is my first post of, I hope, a series related to WPF and C#.
The examples below are made with VS (Visual Studio) 2010 and .Net 4.0, for this precise example you can make it work with .Net 3.5 at least.
During the life of an application we can listen for some important events, these events [...]

WMI and CSharp (C#)
Enumerate all the instances (and properties) from a class via WQL

November 26th, 2008 at 12:32 am by Ahmet Gyger

Tags: , , , ,
Posted in CSharp, Microsoft, Tutorials



In the two previous posts (Enumerate all classes from a namespace and Enumerate all Namespaces from Root) we gather enough information to enumerate namespaces and classes. In this post we are going to see how to enumerate all the instances from a class via WQL.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
[...]

WMI and CSharp (C#):
Enumerate all classes from a namespace

October 29th, 2008 at 10:57 pm by Ahmet Gyger

Tags: , , , , ,
Posted in CSharp, Microsoft, Tutorials



Now that we know how to enumerate all the namespace from root, let’s have a look on how to enumerate all the classes from a namespace.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
{
static void Main(string[] args)
[...]

WMI and CSharp (C#):
Enumerate all Namespaces from Root

October 28th, 2008 at 11:29 pm by Ahmet Gyger

Tags: , , ,
Posted in CSharp, Microsoft, Tutorials



I like to understand WMI (Windows Management Instrumentation) as a database, main concepts are:
Namespaces: Databases
Classes: Tables
Properties: Columns
Instances: Lines
Values: Fields
With this in mind, we can start enumerating all the namespaces we can access locally.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
{
static [...]