Page 5 of 7 FirstFirst ... 234567 LastLast
Results 41 to 50 of 66
  1. #41

    @ben77 - If you want to follow OOP style then try to use properties in passing data between forms/classes.

  2. #42
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    all are in OOP style

  3. #43
    Quote Originally Posted by Carla03 View Post
    lisod diay ang C#? mao gyud ni pinakafirst na major subject (CS10) nako pag 1st year college sa USC.
    OT
    kuyawa gyud bro ga oop namu pag 1st yr ninyo?

  4. #44
    Quote Originally Posted by MarkCuering View Post
    are you sure on that eax?
    Yes. as what @ben77 posted that enum are type constants.

    enums in C# and C++ are the same. They are used as constants. Though they have different ways implementating.

  5. #45
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    @eax, allow me to share about this, just correct me if I made something wrong in your point of view, considering I'm still new in C# and still still still recovering where I was lost.... C# is not forgiving this time.

    C++ enums are not type-safe while C# strongly are...okay, MS won on this.... hurray....!!!
    but unfortunately, C# enum cannot be implicity assign to another enum even though members are they same! ohhhhh... and I almost slam my keyboard figuring it out what the heck went wrong, and thus, this is one of the pitfalls that anyone who was working C++ before and try to study C#. how sad.... C++ enums is more manageable I guess...

    We once had problem before importing native C++ enums in .NET project under C#. luckily, geeks out there already shared and discuss, most of the victims were came from C++ project doing C# ...but if you try to view on the next release of c++ C++0x - Wikipedia, the free encyclopedia they abit changed for good.

    another thing is C/C++ enums "scope", where in the first place they don't have "class scope" concept. well, alot of things to discuss about enums though, like casting your enums while in C# you don't have to... but so far, the underlying "System.Enum" in .NET class library is the base class of enum types and it already contains methods that allow you to work in various ways (I hope so, this was based from ben's post) hope to learn more someday....

  6. #46
    @MarkCuering

    notice on the "cast" on his "OBJECT" approached, its no longer required, or let say its an illegal in C++ point of view... in C# it runs but technically it is wrong. and try not to use "Properties Approached" its not safe...

    fully noted...

    thanks again bro....

    @ta3

    thanks for the tip... i appreciate the help bro...


    salamat sa tanan

  7. #47
    Quote Originally Posted by MarkCuering View Post
    @eax, allow me to share about this, just correct me if I made something wrong in your point of view, considering I'm still new in C# and still still still recovering where I was lost.... C# is not forgiving this time.

    C++ enums are not type-safe while C# strongly are...okay, MS won on this.... hurray....!!!
    but unfortunately, C# enum cannot be implicity assign to another enum even though members are they same! ohhhhh... and I almost slam my keyboard figuring it out what the heck went wrong, and thus, this is one of the pitfalls that anyone who was working C++ before and try to study C#. how sad.... C++ enums is more manageable I guess...

    We once had problem before importing native C++ enums in .NET project under C#. luckily, geeks out there already shared and discuss, most of the victims were came from C++ project doing C# ...but if you try to view on the next release of c++ C++0x - Wikipedia, the free encyclopedia they abit changed for good.

    another thing is C/C++ enums "scope", where in the first place they don't have "class scope" concept. well, alot of things to discuss about enums though, like casting your enums while in C# you don't have to... but so far, the underlying "System.Enum" in .NET class library is the base class of enum types and it already contains methods that allow you to work in various ways (I hope so, this was based from ben's post) hope to learn more someday....
    C# enums is considered a (wrapper) class unlike in c++ is just only a data type. Just like what I've said enums are only good in constants variables. Same ra gud na sa boolean sa C++ and C#. Ang boolean sa C++ is also considered integer unlike sa C#.
    Last edited by eax; 11-15-2008 at 06:04 PM.

  8. #48
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    yup....that's why its not the same... they way you manipulate and in compilers point of view...

    bro paki rephrase hehehe, what makes you think that C++ Boolean is considered as Integer?

    BOOL only uses 1 bit of memory

    INTEGER is 16 bits of memory in 16bit architecture and on its compiler, and at present
    INTEGER is 32 bits like native x86 processors in LINUX or WINDOWS, same as it would be in 64bit processor unless you will override it with some compiler settings.


    or what you mean to say is BOOLEAN statement? that in C# you have to explicitly compare? not like C++ where you can use if(x).

  9. #49
    Quote Originally Posted by MarkCuering View Post
    yup....that's why its not the same... they way you manipulate and in compilers point of view...

    bro paki rephrase hehehe, what makes you think that C++ Boolean is considered as Integer?

    BOOL only uses 1 bit of memory

    INTEGER is 16 bits of memory in 16bit architecture and on its compiler, and at present
    INTEGER is 32 bits like native x86 processors in LINUX or WINDOWS, same as it would be in 64bit processor unless you will override it with some compiler settings.


    or what you mean to say is BOOLEAN statement? that in C# you have to explicitly compare? not like C++ where you can use if(x).
    OT :
    in c++ you can compre bool as integer like char. For sample code :

    #include <iostream>

    using namespace std;

    int main(int argc, char* argv[]) {
    bool is_integer = false;

    if (is_integer == 0) {
    cout << "false" << endl;
    }

    cout << is_integer << endl;
    }

    I think bit, char, byte, short are also classified as integers they only differ in sizes.

  10. #50
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    I see... although we normally can make it as if(x) where x is TRUE or FALSE... or Bit 1 or Bit 0 (internally)

  11.    Advertisement

Page 5 of 7 FirstFirst ... 234567 LastLast

Similar Threads

 
  1. What do you want to learn?
    By chai in forum General Discussions
    Replies: 2861
    Last Post: 02-17-2021, 07:19 PM
  2. Replies: 8
    Last Post: 05-06-2011, 05:51 PM
  3. WHO WANTS TO LEARN " WUSHU" like JET LI
    By gigzzhai in forum Sports & Recreation
    Replies: 29
    Last Post: 10-15-2010, 01:19 PM
  4. Want to Learn Self Defence?
    By pring_pring in forum Sports & Recreation
    Replies: 2
    Last Post: 04-25-2008, 04:03 PM
  5. Do You Want To Learn How To Blog But Don't Know How?
    By NetMarketer in forum Websites & Multimedia
    Replies: 0
    Last Post: 12-11-2007, 04:57 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