C# handling properties

Electronics Computer Programming Q&A
Post Reply
User avatar
Posts: 24
Joined: Sat Nov 22, 2008 11:02 pm
Location: Buenos Aires - Argentina

C# handling properties

Post by atferrari » Fri Dec 19, 2008 1:19 am

C# language

I understand the basics of handling properties from classes declared by yourself using {get, set}.

I would like to know how to handle properties of classes already declared by C#, i.e. System.Console.Foreground.

Could anyone help with an example or two?


User avatar
Posts: 519
Joined: Sat Jun 28, 2008 8:57 am
Location: Cleveland, Ohio

Post by reloadron » Fri Dec 26, 2008 4:54 pm

Using System.Console.Foreground do you mean like this:

Code: Select all

using System;

public class Test{
   static void Main(string[] args){
      Console.Title = "Standard Console";
      Console.ForegroundColor = ConsoleColor.Red;
      Console.BackgroundColor = ConsoleColor.Green;
      Console.WriteLine("Press Enter to change the Console's appearance.");
I am not a programmer and what little I do I generally do in VB.


Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests