Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Java > Classes

Classes - Page 3

41-60 of 417     Previous     Next
Restrict the Types of Template Argument for a Template Class
by Saurabh Ramya
Find out how to use the Forwards template declaration to restrict the types of template arguments for a template class.
Tracking Elapsed Time
by Andrew Ling
This C++ class tracks elapsed time. The mark() method is called at a given point and the following methods retrieve the elapsed time between points, the total time, or the average time.
Use Local Classes to Implement Nested Functions in C++
by Saurabh Ramya
Find out how you can use local classes to simulate the effects of nested functions.
Use java.util.Observable to Monitor Object State changes
by Amit Tuli
Use the class java.util.Observable to monitor Java objects for any change in their states.
Using Vectors
by Sophy Pal
A vector is basically an array that stores its elements dynamically. This means that it can grow infinitely or until you have no more memory.
Getting Around the Java Compiler's 64K Limitation
by Amit Jain
Find out how you can use inheritance to work around the Java compiler's 64K limitation.
Use C#'s Reflection to Retrieve Application Information
by Bradley L. Jones
C#'s Reflection capability allows you to reflect a class upon itself to determine the methods or properties it contains.
Static Variable Declarations in Header Files
by Selva Somasundaram
Learn how to avoid multiple instances of static variables with this code.
Initializing Class Members
by Rahul Gupta
Force the Extension of a Class Without Overriding Any Single Method
by Matthew Johnson
GetAllMembers - Retrieving a hashtable containing all the members in a type
by Francesco Balena
Return a case-insensitive hashtable containing all the members in a type Note: requires Imports System.Reflection Example: Dim ht As Hashtable = GetAllMembers(GetType(String), False) For Each key As Object In ht.Keys Dim member As MemberInfo = DirectCast(ht(key), MemberInfo) Debug.
How to Write, Use, and Test a Singleton Class
by Elayaraja David
LoadAssembly - Loading an assembly identified by the path or the partial name
by Francesco Balena
Load an assembly identified by the path or the partial name Note: requires Imports System.Reflection Examples: 1) Dim asm As [Assembly] = LoadAssembly("System.Web") 2) Dim asm As [Assembly] = LoadAssembly("C:\MyApp\MyAssembly.dll")
Adding Design-Time support to your classes
by Marco Bellinaso
If you use VS.NET you know that there are a number of classes that offer visual design-time support, i.e. they can be dragged and dropped on your form, and their properties can be set through the Properties Window. This saves you from writing the instance declaration and the code to set the ...
Write a Primary Key Class in CMP EJB
by Elayaraja David
HaveSameValue - Check whether all the input controls have the same property value
by Marco Bellinaso
Return True if all the controls in the input array have the same value for the specified property Note: requires the GetField function Example: Debug.WriteLine(HaveSameValue("Text", TextBox1, Button1, Button2)) Debug.WriteLine(HaveSameValue("ForeColor", Button1, Button2)) Button1.ForeColor ...
SetPropertyEx - Set a property of multiple controls/objects
by Marco Bellinaso
Set a property of multiple controls/objects in a single step, and return True if successful Note: requires the SetProperty function Example: SetPropertyEx("Text", "OK!!!", TextBox1, Button1, Button2)
AddRemoveEventHandler - Add or remove an event handler through reflection
by Francesco Balena
Add or remove an event handler through reflection, and return True if successful Examples: add an event handler for Button1's Click event AddRemoveEventHandler(Button1, "Click", New EventHandler(AddressOf OnButton1Click)) remove an event handler for Button1's Click event AddR
GetProperty - Reading a property via reflection
by Francesco Balena
Read a property via reflection or return a default value Example: MessageBox.Show(GetProperty(Button1, "Text", ""))
SetProperty - Setting a property via reflection
by Francesco Balena
Set a property via reflection and return True if successful Example: SetProperty(Button1, "Text", "Click me")
41-60 of 417     Previous     Next
Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date