Results 1 to 7 of 7

Thread: things I don't understand

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    things I don't understand

    Hello ,
    I would appreciate that if anyone explain these keywords(although I've read a lot about them but I still find myself unable to understand them

    1-Callback Functions
    2-Enums
    3-Types



  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Callback functions are usually the method that gets called at the end of some form of Asynchronous method call. Say you Invoke a delegate with BeginInvoke you pass in a method that gets called when the job is done since execution continues on the main thread. Its sort of like the way events work.

    Enums are grouped constants, You see these all the time in the IDE intellisense. Like when you use a MessageBox there is a list of buttons and icons that you can use these are stored in an enum.

    Types in .NEt are like data types in vb6 except now that everything is an object the Type is the object type and it goes beyond the basic data types.

  3. #3

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    if you make it clearer I would appreciate it ?

  4. #4

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    well , umm
    what about these keywords COMs & Attributes???

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    What is it that you don't understand? Explain it back to me so I can see where you are going wrong.

    Enums are fairly easy with an example:

    VB Code:
    1. Public Enum MyList
    2.   Hairythings
    3.   BumpyThings
    4.   WetThings
    5. End Enum
    6.  
    7. 'these actually are now constants with asscending values starting at 0
    8. 'HairyThings=0
    9. 'BumpyThings=1
    10. 'WetThings=2
    11. 'But you can use them as a set
    12.  
    13. dim YourList as MyList
    14.  
    15. YourList=MyList.BumpyThings 'you will see the list in the intellisense also

    Think of Types as object types. So a Button's type is Button.
    If you made a class named LearningTypes then its type would be LearningTypes. You could then check an instance of an object to see what type it is:

    VB Code:
    1. 'here is an array of objects of different types
    2. dim obj() as Object={New LearningTypes,1,"Shhh I'm learning"}
    3.  
    4. dim o as Object
    5. For each o in Obj
    6.   If o.gettype is gettype(LearningTypes) then
    7.      Msgbox("You found the Type I made, Hooray!")
    8.   end If
    9. Next

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    32
    Pirate, I think what you're asking here suggests that you probably need to invest in a good .Net book! The items you want to know about are all fairly basic parts of the framework - it sounds to me you need to understand a bit more about it at a lower level. For example Enums, Types and Structures are all fairly basic but not something easily explained in the detail you seem to want in a forum like this.

    I can recommend Francesco Balena's "Programming MS Visual Basic .Net" (ISBN 0735613753) if you are interested. He goes into of the things you are asking about in ample detail with lots of VB.Net examples. It is a very thorough book and has helped me answer many questions such as the ones you have.

    I've definately been in the space you seem to be in so can sympathize - but IMHO I think you need to do some reading - all will become clear very quickly!

    Mike.

  7. #7

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    ok ,
    1-What are the benefits of enums and types(examples)??
    2-Are callback functions similar to regular functions ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width