Results 1 to 4 of 4
  1. #1
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    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:
    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:

    public abstract class TextReader : MarshalByRefObject, IDisposable
    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.

  2. #2
    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.

  3. #3
    this is nice... i myself having trouble sometimes the difference between Abstract and Interface..

  4. #4
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    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!!!!

  5.    Advertisement

Similar Threads

 
  1. The Forum Song - Now Available for download...
    By BeoR in forum General Discussions
    Replies: 899
    Last Post: 05-14-2024, 11:51 AM
  2. Tip for the Week
    By trabunco in forum Fitness & Health
    Replies: 8
    Last Post: 12-03-2015, 09:52 PM
  3. For Sale: rush: PSP 2000 black fully downloadable 7.5k for this week only
    By ohoixmakoi in forum Gadgets & Accessories
    Replies: 8
    Last Post: 10-06-2009, 09:14 AM
  4. 28 Days Later and 28 Weeks Later
    By |dwyt| in forum TV's & Movies
    Replies: 50
    Last Post: 09-05-2008, 03:03 PM
  5. How many times a week do you go to the gym?
    By animelover in forum Fitness & Health
    Replies: 31
    Last Post: 09-14-2006, 09:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top