Archive for January, 2007

Type: String The name of a VB .NET

Wednesday, January 31st, 2007

Type: String The name of a VB .NET data type Return Value A String indicating the name of a CTS data type Description Returns the name of the Common Type System (CTS) data type that corresponds to a particular Visual Basic data type Rules at a Glance vbname must be the name of a valid VB .NET data type, such as Boolean, Byte, Char, Date. Decimal, Double, Integer, Long, Object, Short, Single, or String. If vbname is not a valid VB .NET data type, the function returns Nothing. If vbname does not directly correspond to a CTS data type, the function returns Nothing. For example, user-defined types created with the Structure construct and classes created with the Class construct both return Nothing if their data type names are passed to the function. Example Public Structure Point Dim x As Integer Dim y As Integer End Structure Public Class CEmployee End Class Module modMain Public Sub Main ‘ Returns System.Int32 Dim i As Integer = 100 Console.WriteLine(”Type of i: ” & SystemTypeName(TypeName(i))) ‘ Returns Nothing Dim o As Object Console.WriteLine(”Type of o: ” & SystemTypeName(TypeName(o))) ‘ Returns Nothing Dim oEmp As New CEmployee Console.WriteLIne(”Type of oEmp: ” & SystemTypeName(TypeName(oEmp))) ‘ Returns Nothing Dim uPt As Point Console.Writeline(”Type of uPt: ” & SystemTypeName(TypeName(uPt))) ‘ Returns System.String Dim sName As String = “This is a string.” Console.WriteLine(”Type of sName: ” & SystemTypeName(TypeName(sName))) End Sub
Note: If you are looking for top 10 and very good webhost to host and run your jsp application check Actions jsp hosting services

Syntax SyncLock expression …[ code ] End SyncLock (Wiki hosting)

Wednesday, January 31st, 2007

Syntax SyncLock expression …[ code ] End SyncLock expression Use: Required Type: Any reference type (class, module, interface, array, or delegate) An expression yielding a single result that can be used to determine the accessibility of code code Use: Optional The code statements to which access is synchronized and that will be executed sequentially Description Prevents multiple threads of execution in the same process from accessing shared data or resources at the same time Rules at a Glance SyncLock blocks a thread’s access only if that thread belongs to the same object instance. Programming Tips and Gotchas The SyncLock statement wraps a call to the BCL’s System.Threading.Monitor.Enter method. The BCL includes a number of other synchronization mechanisms, all of which are located in the System.Threading namespace. VB .NET/VB 6 Differences The SyncLock statement is new to VB .NET. VB 6 provided the developer with no direct means of controlling threads of execution in applications or components. SystemTypeName Function Class Microsoft. VisualBasic.Information Syntax SystemTypeName(vbname) vbname Use: Required
Note: If you are looking for cheapest and affordable webspace to host and run your servlet application check Astra j2ee hosting services

Phpbb hosting - The initial cost of the asset salvage Use:

Wednesday, January 31st, 2007

The initial cost of the asset salvage Use: Required Data Type: Double The value of the asset at the end of its useful life life Use: Required Data Type: Double The length of the useful life of the asset period Use: Required Data Type: Double The period whose depreciation is to be calculated Return Value A Double giving the sum-of-years depreciation of an asset for a given period Description Computes the sum-of-years’ digits depreciation of an asset for a specified period. The sum-of-years’ digits method allocates a larger amount of the depreciation in the earlier years of the asset. Rules at a Glance life and period must be expressed in the same time unit. For example, if life represents the life of the asset in years, period must be a particular year for which the depreciation amount is to be computed. All arguments must be positive numeric values. To calculate the depreciation for a given period, SYD uses the formula: (Cost-Salvage)*((Life-Period + 1)/(Life*(Life + 1)/2)) See Also DDB Function, SLN Function SyncLock Statement
Hint: If you are looking for high quality webhost to host and run your jsp application check Vision web hosting jsp services

Example The GetTextColor function uses the (1and1 web hosting) Switch function

Tuesday, January 30th, 2007

Example The GetTextColor function uses the Switch function to return an RGB color value that depends on the sign of the integer passed to it as a parameter. To access the Color structure, it imports the System.Drawing namespace of the Base Class Library. Private Function GetTextColor(lValue As Integer) As Integer Dim fColor As New Color Dim iColor As Integer fColor = Switch(lValue > 0, Color.Blue, _ lValue = 0, Color.Black, _ lValue < 0, Color.Red) ' Convert color name to RGB color and strip out ' high order byte of high-order word iColor = fColor.ToArgb and &H00FFFFFF GetTextColor = iColor End Function Programming Tips and Gotchas The Switch function can prove to be an efficient alternative to If...Then...Else statements, but it can't be used in situations where multiple lines of code are required to be executed on finding the first True expression. Programming Tips and Gotchas Switch does not use short-circuiting. That is, even though it returns only the first True expression, it evaluates all expressions. As a result, Switch will generate a runtime error if any of these expressions are invalid. See Also Choose Function SYD Function Class Microsoft.VisualBasic.Financial Syntax SYD(cost, salvage, life, period ) cost Use: Required Data Type: Double

Hint: This post is supported by Gama web hosting php services

arguments without parentheses. VB .NET features a standard (Subdomains web hosting)

Tuesday, January 30th, 2007

arguments without parentheses. VB .NET features a standard calling syntax in which arguments are always enclosed in parentheses. See Also Function Statement Switch Function Class Microsoft.VisualBasic.Interaction Syntax Switch(expr-1, value-1[, expr-2, value-2 … [, _ expr-n,value-n]]) expr Use: Required Data Type: Object A number of expressions to be evaluated value Use: Required Data Type: Object An expression or value to return if the associated expression evaluates to True Return Value An Object value or expression Description Evaluates a list of expressions and, on finding the first expression to evaluate to True, returns an associated value or expression Rules at a Glance A minimum of two expression/value pairs is required; additional pairs are optional. Expressions are evaluated from left to right. If none of the expressions is True, the Switch function returns Nothing. If multiple expressions are True, Switch returns the value that corresponds to the first True expression. value can be a constant, variable, or expression.

Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Sandzak.com j2ee web hosting services

Jsp hosting - Use: Optional Program code to be executed within

Tuesday, January 30th, 2007

Use: Optional Program code to be executed within the procedure. Description Defines a subroutine Rules at a Glance Subroutines cannot be nested; that is, you cannot define one subroutine inside another subroutine. (This applies to all procedures.) If you do not include one of the accessmodifier keywords, a subroutine will be Publicby default. Any number of ExitSub statements can be placed within the subroutine. Execution will continue with the line of code immediately following the call to the subroutine. If you specify an optional parameter in your subroutine declaration, you must also provide a default value for that parameter. For example: Private Sub ShowMessage(Optional sMsg _ As String = “Not given”) A subroutine is called by using its name and enclosing any arguments in parentheses. For example, a routine named SomeRoutine might be called as follows: x = 12 y = 12 SomeRoutine(x, y) Note that because it does not return a value, a subroutine cannot be assigned to a variable. For example, the following is illegal: z = SomeRoutine(x, y) Programming Tips and Gotchas There is often confusion between using the ByRef and ByVal methods of assigning arguments to the Sub procedure. ByRef assigns the reference of the variable in the calling procedure to the variable in the Sub procedure; that is, it passes a pointer containing the address in memory of the variable in the calling procedure. As a result, any changes made to the variable from within the Sub procedure are in reality made to the variable in the calling procedure. On the other hand, ByVal assigns the value of the variable in the calling procedure to the variable in the Sub procedure; that is, it makes a separate copy of the variable in a separate memory location. Changes made to the variable in the Sub procedure have no effect on the variable in the calling procedure. In general, ByRef arguments within class modules take longer to handle, since marshaling back and forth between Sub procedure and calling module must take place. So unless you explicitly need to modify a variable’s value within a Sub procedure, it’s best to pass parameters by value. VB .NET/VB 6 Differences If you do not specify whether an individual element in arglist is passed ByVal or ByRef, it is passed by reference in VB 6. In VB .NET, it is passed by value. If a parameter array is used in VB 6, it is an array of variants. In VB .NET, since the Variant is no longer supported, it must be an array of objects. In VB 6, a Sub procedure was called either by using the Call statement and including procedure arguments in parentheses or by using the name of the procedure and including
Quick Hint: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

ByVal Use: Optional Type: Keyword The argument is

Monday, January 29th, 2007

ByVal Use: Optional Type: Keyword The argument is passed by value; that is, the local copy of the variable is assigned the value of the argument. ByVal is the default method of passing variables. ByRef Use: Optional Type: Keyword The argument is passed by reference; that is, the local variable is simply a reference to the argument being passed. All changes made to the local variable will be also reflected in the calling argument. ParamArray Use: Optional Type: Keyword Indicates that the argument is an optional array of variants containing an arbitrary number of elements. It can only be used as the last element of the argument list, and it cannot be used with the ByRef, ByVal, or Optional keywords. varname Use: Required Type: String literal The name of the local variable containing either the reference or value of the argument. type Use: Optional Type: Keyword The data type of the argument. It can be Boolean, Byte, Char, Date, Decimal, Double, Integer, Long, Object, Short, Single, String, a user-defined type, or an object type. defaultvalue Use: Optional Data Type: Any For optional arguments, you must specify a default value. statements

Note: If you are looking for good and affordable webspace to host and run your servlet application check Sandzak servlet hosting services

Mambo hosting - Shadows In a derived class definition, indicates that

Monday, January 29th, 2007

Shadows In a derived class definition, indicates that calls to derived class members that are made through a base class ignore the shadowed implementation. Shared Callable without creating an object of the class. It is, in this strange sense, shared by all objects of the class. These are also called static subroutines. AccessModifier Use: Optional The possible values of AccessModifier are Public, Private, Friend, Protected, or ProtectedFriend. The following table describes the effects of the various access modifiers. Note that “direct access” refers to accessing the member without any qualification, as in: classvariable = 100 and “class/object access” refers to accessing the member through qualification, either with the class name or the name of an object of that class. For more information, see Section 3.7 in Chapter 3. Direct access scope Class/object access scope Private Declaring class Declaring class Protected All derived classes Declaring class Friend Derived in-project classes Declaring project Protected Friend All derived classes Declaring project Public All derived classes All projects name Use: Required Type: String literal The name of the Sub procedure. arglist Use: Optional Data Type: Any A comma-delimited list of variables to be passed to the sub procedure as arguments from the calling procedure. arglist uses the following syntax and parts: [Optional] [ByVal | ByRef] [ParamArray] varname[( )] _ [As type] [= defaultvalue] Optional Use: Optional Type: Keyword An optional argument is one that need not be supplied when calling the function. However, all arguments following an optional one must also be optional. A ParamArray argument cannot be optional.

Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Sandzak.com j2ee web hosting services

Related items of (Joomla hosting) information are often stored

Monday, January 29th, 2007

Related items of information are often stored in multiple arrays (or in a multidimensional array). However, it is often preferable to store related data in a single array of structures. The Structure statement is often used to define a data structure capable of retrieving, storing, and saving fixed-length records. However, this is complicated by the absence of support for explicitly declared fixed-length strings in VB.NET. One solution is to use the attribute, where length is the fixed length of the string, when defining a member of type String. This instructs the VB .NET compiler to enforce a particular string length for the structure. For example: Structure Person Public FName As String Public MName As String Public LName As String Public Age As Short End Structure VB .NET/VB 6 Differences The Structure…EndStructure construct is new to VB .NET. It replaces the Type…EndType construct in VB 6. VB 6 user-defined types are different than VB .NET structures. A VB 6 user-defined type is simply a composite data type that combines multiple data types; it allows the user-defined type to be treated as a contiguous, word- or double-word aligned block of memory. A VB .NET structure is in some sense a hybrid object that combines data types and methods; ordinarily, no assumptions should be made about its layout in memory. In VB 6, the declaration of user-defined type members did not permit an access modifier. In VB .NET, it is required. Sub Statement Syntax [ClassBehavior] [AccessModifier] Sub name [(arglist)] [statements] [Exit Sub] [statements] End Sub ClassBehavior Use: Optional Type: Keyword One of the keywords shown in the following table: Keyword Description Overloads Indicates that more than one declaration of this subroutine exists (with different argument signatures). Overrides For derived classes, indicates that the subroutine overrides the subroutine by the same name (and argument signature) in the base class. Overridable Indicates that the subroutine can be overridden in a derived class. NotOverridable Indicates that the subroutine cannot be overridden in a derived class. MustOverride Indicates that the subroutine must be overridden in a derived class.

Hint: This post is supported by Gama web hosting php mysql provider

Method member declarations End (Web hosting macintosh) Structure Description Used to

Monday, January 29th, 2007

Method member declarations End Structure Description Used to declare user-defined types. Structures are similar to classes, but they are value types rather than reference types. Rules at a Glance The members of a structure can be variables, properties, methods, or events. Note, however, that each member must be declared with an access modifier: Public (or Dim), Private, or Friend. You cannot assign a structure member an initial value at the same time as you declare it. As a result, the following Structure construct is illegal: Structure Point Public x As Integer = 0 ‘ Illegal Public y As Integer = 0 ‘ Illegal End Structure Structure members can be other structures or objects. If a structure member is an array, it cannot be explicitly dimensioned. Structures can be passed as arguments to functions or as the return type of a function. Although structures are similar to classes, the following class features are not supported in structures: o Structures cannot explicitly inherit, nor can they be inherited. o All constructors for a structure must be parameterized. o Structures cannot define destructors. o Member declarations cannot include initializers, nor can they use the AsNew syntax or specify an initial array size. Example The simplest and most common use of structures is to encapsulate related variables. For instance, we might define a structure as follows: Structure strPerson Public Name As String Public Address As String Public City As String Public State As String Public Zip As String Public Age As Short End Structure To define a variable of type strPerson, we write (as usual): Dim APerson As strPerson To access a member of a structure, we use the dot syntax, as in: APerson.Name = “Beethoven” Programming Tips and Gotchas

Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Sandzak jsp web hosting provider