|
-
Nov 10th, 2002, 06:29 PM
#1
Thread Starter
Sleep mode
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
-
Nov 10th, 2002, 08:54 PM
#2
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.
-
Nov 11th, 2002, 06:02 PM
#3
Thread Starter
Sleep mode
if you make it clearer I would appreciate it ?
-
Nov 11th, 2002, 06:08 PM
#4
Thread Starter
Sleep mode
well , umm
what about these keywords COMs & Attributes???
-
Nov 11th, 2002, 06:18 PM
#5
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:
Public Enum MyList
Hairythings
BumpyThings
WetThings
End Enum
'these actually are now constants with asscending values starting at 0
'HairyThings=0
'BumpyThings=1
'WetThings=2
'But you can use them as a set
dim YourList as MyList
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:
'here is an array of objects of different types
dim obj() as Object={New LearningTypes,1,"Shhh I'm learning"}
dim o as Object
For each o in Obj
If o.gettype is gettype(LearningTypes) then
Msgbox("You found the Type I made, Hooray!")
end If
Next
-
Nov 11th, 2002, 06:19 PM
#6
Member
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.
-
Nov 11th, 2002, 06:58 PM
#7
Thread Starter
Sleep mode
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|