iSTORYA.NET

Go Back   iSTORYA.NET > Science & Technology > Software & Games > Programming
: :

Register FAQ Members List Calendar Mark Forums Read

Programming :: Programming related discussions ::

Reply
LinkBack Thread Tools
  #1  
Old 10-30-2009, 03:08 PM
Senior Member
MarkCuering is offline
Join Date: Aug 2008
Posts: 603
Blog Entries: 1
Default [WEEK 1] Downloading C# Abstract & Interface.

I'm working on this Abstract and Interface thing in C#, if you are still new on this, or not yet heard about it, try to make some research, write down some notes and add some practical questions. My Goal is to understand this fully and how to deliver it to anyone that can understand its application.

I find it very important topic for beginners, that instead of studying how to declare integer, arrays, or how to use loop, One should start writing abstract and interfaces. Understand it! and find it how abstract and interface being use .NET environment.


for example:

in your Windows file you will find "mscorlib.dll" which is one of the DLL use in "system" namespace. like the one you use to write at the beginning of the program eg. "using System;"

consider this program:
Quote:
using System;
using System.IO;

class Program
{
static void Main()
{
string line;
using (StreamReader reader = new StreamReader("file.txt"))
{
line = reader.ReadLine();
}
Console.WriteLine(line);
}
}
I'm sure you know what program is doing, but what is StreamReader? is it a product of Abstract and Interfaces? the answer is YES(both)! In fact every line of it, went thru various ABSTRACT and INTERFACE definitions.


the StreamReader is a derived from the abstract base class Textreader, The StreamReader class is designed for reading character or string input from a file. This class contains methods to read single characters, blocks of characters, lines of characters, or even the whole file into a single string variable.

You might be asking now, where to find the the derived statement of Textreader? is it an abstract or interface? from MSDN definitions:

Quote:
public abstract class TextReader : MarshalByRefObject, IDisposable
Quote:
public abstract class MarshalByRefObject
public interface IDisposable
that's it! TextReader is an Abstract, derived from another both Abstract and Interface class, which again use in StreamReader.

all of them is under the "system" namespace which is written inside mscorlib.dll. If it happens that you delete the file, you will get compilation error:

Code:
error CS0025: Standard library file 'mscorlib.dll' could not be found
OK! cut...! hehehe, so much for that for now.

If you have some valuable materials, programs, insights, knowledge, questions or whatsoever you want to talk or share just PM me. I will be making some handouts with exercises and sample running program. All knowledge, Idea, graphics etc... will be given some credits.

The Material may includes the following:


1. Overview of Abstract and Interface.
2. Abstract vs Interface.
3. When to use Abstract and when to use Interface.
4. Various example of Abstract and Interface.
5. Problem Solving using Abstract, using Interfaces and using Both Abstract and Interface.


Problems will be taken out from one of my application, or I will get some open source program written in python/c++/vb and convert it to C#.NET version.

Programs are all console based. NO GUI this time.

Its about time to share some knowledge, ask some knowledge, make use of the knowledge you got.

cheers...
Last edited by MarkCuering; 10-30-2009 at 03:15 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 11-02-2009, 05:18 PM
Elite Member
silent-kill is offline
silent-kill's Avatar
Join Date: Mar 2003
Gender: Male
Posts: 1,739
Default

simply put abstract as a 'concept' of an object that cannot be initialized and should be 'inherited'

Interface are 'funnel'(imbodo sa bisaya pa).

hope that helps anyone lol.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 11-03-2009, 04:45 PM
C.I.A.
digitalsuperman is offline
digitalsuperman's Avatar
Join Date: Dec 2003
Posts: 7,153
Default

this is nice... i myself having trouble sometimes the difference between Abstract and Interface..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 11-03-2009, 06:42 PM
Senior Member
MarkCuering is offline
Join Date: Aug 2008
Posts: 603
Blog Entries: 1
Default

I almost finished my first draft... and you know what? It gives me another 25 examples to finish, after I finish 1 another 2 or 5 situations coming in LOLx.... WANTED EDITOR / REVIEWER!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
For Sale: aBstrAct tEe @ 90 pEsOs ONLy!!! baby_reisa Clothing, Shoes, & Accessories 3 08-21-2009 12:38 PM
Abstract nabzy Arts & Literature 0 08-13-2009 10:35 PM
For Sale: M-Audio Fast Track Pro USB audio interface and Boston Engineering USB Audio interface FNDR Music & Movies 20 07-03-2009 12:41 AM
Abstract Arts Gallery RACKETS_iNC. Arts & Literature 2 06-14-2009 11:12 AM
Fortune's Law of the Week (this week, from Kentucky) nsic Humor 0 02-13-2009 02:09 PM


All times are GMT +8. The time now is 08:45 PM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
(c) 2002-2009 iSTORYA.NET | Design by DrE | Modifications by BeoR