User Profile

Collapse

Profile Sidebar

Collapse
CSharpProgrammer
CSharpProgrammer
Last Activity: Aug 17 '09, 04:47 AM
Joined: Dec 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • CSharpProgrammer
    replied to Overriding a enumerator
    in .NET
    Well, they are in fact identical. I guess it is must the signature that makes them different.
    So, I suppose that means there is no way to override or add Enumerators without modifying the base class.

    I wonder what would be a better way do that, without using numerators?

    I just want to add more enumerators like Saturday and Sunday to an already existing Enumerator without having to modify the base class....
    See more | Go to post

    Leave a comment:


  • CSharpProgrammer
    replied to Overriding a enumerator
    in .NET
    Thanks, but I knew that.
    I was just trying not really show too much detail and distract from the main content.

    Oh well.
    Thanks anyways,...
    See more | Go to post

    Leave a comment:


  • CSharpProgrammer
    replied to Overriding a enumerator
    in .NET
    That is not important and irrelevant.
    What is important is how to override the enumerator.
    I did stumble upon using the 'new' keyword, but that doesn't seem to work properly. I even tried adding Parent.Weekday to no avail.
    Here is some executable code that doesn't work.



    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    
    namespace Enum3
    ...
    See more | Go to post
    Last edited by Plater; Jan 28 '08, 06:51 PM. Reason: fixing code tags again

    Leave a comment:


  • CSharpProgrammer
    started a topic Overriding a enumerator
    in .NET

    Overriding a enumerator

    Hi,

    Say in the base class they have a vitual method that Gets Days.
    Well, in the base class, only Monday through Friday are defined.
    Now, I have to extend the days to include Saturday and Sunday.

    Code:
    public BaseClass
    {
        public enum Days
       {
          Monday,
          Tuesday,
          Wednesday,
          Thursday,
          Friday,
       }
        public
    ...
    See more | Go to post
    Last edited by Plater; Jan 28 '08, 03:42 PM. Reason: fixed code tags use the [] not <>

  • Breaking up the Form File into multiple files or multiple objects

    Hi,

    I have a Form with a Tab Control.
    It is getting really big and really long and really hard to navigate.

    I was wondering if there was a way to break up the Form Class into manageable objects, or maybe just into multiple files?

    Form1.cs
    Code:
    namespace FormNameSpace
    {
        partial class Form1
        {
        }
    }
    Tab1.cs
    Code:
    
    
    ...
    See more | Go to post

  • I wasn't familiar with the Resource Manager.
    I suppose that is the correct way to do it.
    I thought I could just right click and add the resource.
    It does work, it just doesn't show up in Resource Manager.

    I wonder if you can add a folder to seperate the resources from the other files?
    I will have to try that out.
    This is my first time using Resources and I am fairly new to C#.

    Than...
    See more | Go to post

    Leave a comment:


  • I got it!!!

    I created a folder and added the bmp/jpg Resouces to that folder,
    So, I had to add the folder to the path.

    Stream st = this.GetType(). Assembly.GetMan ifestResourceSt ream("Default_n amespace.Resources.RWC.jpg");

    *Note the "Default_namespa ce", which is different from "First_namespace".
    Which is what you will see in Project Properties.
    ...
    See more | Go to post

    Leave a comment:


  • The following code works.
    I don't know why mine doesn't?

    I noticed that in "Project Properties", there is a "Default namespace".
    The GetManifestReso urceStream() seems to be dependent upon that, rather than the the actual namespace.
    *Note: WindowsApplicat ion1 -vs- Windows_Applica tion_1

    I'll update the post if I ever figure out why mine doesn't want to work.
    Though I think...
    See more | Go to post

    Leave a comment:


  • I suppose you could add all the using statements globally to the top.
    Heck, I suppose you could even add every known using statement, whether you use them or not.

    My intention is to seperate them into a more object oriented approach.
    That way, I know what class is using some other class/namespace.
    That is why I did it that way.

    I don't really know how many namespaces or classes can be in one file...
    See more | Go to post

    Leave a comment:


  • GetManifestResourceStream returning NULL (Embedded Resource)

    Hi,

    I followed an example that loads an embedded resource
    http://support.microso ft.com/kb/324567
    That works just fine and dandy.

    My problem is that my namespaces are setup a bit differently.
    I tried using both namespaces and neither seem to work.

    I'm assuming it shoud be the First_namespace , since that is the project namespace.
    - The resource compile option is set to for embedded...
    See more | Go to post
No activity results to display
Show More
Working...