Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

(Page 55 of 133) 3985 Result(s) found 

 

A For Each loop that iterates in reverse order
Total Hit (11615) The For Each loop always iterates orderly on all the elements of an array or a collection (more precisely, on all the elements of a class that implements the IEnumerable interface). What happens if you need to iterate in reverse order, though? If you have an array or an ArrayList you can always refe ....Read More
Rating
A For Each statement that visits items in random order
Total Hit (2704) At times you may need to process elements of an array, a collection, or a dictionary object in random order, for example when sampling a population or (more often) when writing a game, such as a card game. Here's a class that you can use in a For Each statement to randomly process all the elements o ....Read More
Rating
Building arrays on the fly
Total Hit (2867) VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines «Code LangId=2» ' Get the Graphics object from the form. Dim gr As Graphics = Me.CreateGraphics ' Draw three straight line ....Read More
Rating
Create zero-elements arrays
Total Hit (2559) The .NET framework lets you create two types of "empty" arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set to Nothing, whereas zero-element arrays are non-Nothing variables that point to arrays with zero eleme ....Read More
Rating
Store bits and small integers efficiently in a BitVector32
Total Hit (3290) The System.Collections.Specialized.BitVector32 structure can be used to store up to 32 boolean values, or a set of small integers that can take up to 32 consecutive bits. The BitVector32 is similar to the BitArray class, in that it can hold boolean values that take only one bit each, yet it is more ....Read More
Rating
Store large Boolean arrays in a BitArray object
Total Hit (5851) .NET Boolean values require 4 bytes each, as opposed to the 2 byte taken under previous VB versions. When creating very large Boolean arrays this extra memory impacts negatively on the application's performance. The .NET Framework offers a specialized class, the System.Collection.BitArray class, whi ....Read More
Rating
Understanding passing arrays by reference
Total Hit (3557) .NET arrays are object types, thus an array variable is actually a pointer to the object where data is actually stored. For this reason, when you pass an array to a procedure the pointer is passed and the called procedure is always able to modify the elements of the array, regardless of whether the ....Read More
Rating
Create a Touch utility
Total Hit (3187) The SetCreationTime, SetLastWriteTime, and SetLastAccessTime methods of the System.IO.Directory class let you modify the date attributes of a file or directory: «Code LangId=2» ' Change the access date- and time of all files in C:\DOCS. For Each fname In Directory.GetFiles("c:\docs") File. ....Read More
Rating
Create all the subdirectories for a new folder
Total Hit (3766) The System.IO.Directory class exposes a CreateDirectory method that, as its name suggests, can create a subdirectory. However, this method is even more powerful than it appears at a first glance, in that it can even create all the intermediate subdirectories, if necessary. In other words, the follow ....Read More
Rating
Create directory paths
Total Hit (3768) Visual Basic 6's MkDir command, as well as the DOS MD command, can create only one subdirectory and fail if any subdirectory on the specified path doesn't exist: «Code LangId=2» ' This VB6 statement fails if C:\MyApp doesn't exist MKDIR "c:\MyApp\MyDir" «/Code» Conversely, the Directory.Crea ....Read More
Rating
Display a directory tree
Total Hit (3953) Thanks to the GetDirectories and GetFiles methods of the System.IO.Directory class, you need very little code to iterate over all the directories and files of a directory tree. For example, the following code snippet prints the structure of a directory tree and (optionally) the name of files in each ....Read More
Rating
Filter file names on their names or attributes
Total Hit (2773) The GetFiles and GetDirectories methods of the System.IO.Directory class can take an argument containing wildcards, to filter the result: «Code LangId=2» ' Display all the *.txt files in C:\DOCS. Dim fname As String For Each fname In Directory.GetFiles("c:\docs", "*.txt") Console.WriteLin ....Read More
Rating
Determine whether a string is lowercase
Total Hit (3240) Here's a quick-and-dirty method to determine whether a string contains only lowercase characters «Code LangId=2» ' the string to test is in the SOURCE variable If System.Text.RegularExpressions.Regex.IsMatch(source, "^[a-z]+$") Then Console.WriteLine("Lowercase string") End If «/Code» ....Read More
Rating
Determine whether a string is uppercase
Total Hit (3060) Here's a quick-and-dirty method to determine whether a string contains only uppercase characters «Code LangId=2» ' the string to test is in the SOURCE variable If System.Text.RegularExpressions.Regex.IsMatch(source, "^[A-Z]+$") Then Console.WriteLine("Uppercase string") End If «/Code» ....Read More
Rating
Faster string comparison with the Is operator
Total Hit (3205) .NET strings are objects, so what you store in a String variable is actually a reference to a String object allocated in the managed heap. Even though the VB.NET compiler attempts to hide the object nature of strings as much as it can - for example, you don't need to declare a String object with a N ....Read More
Rating
Faster string comparisons with CompareOrdinal
Total Hit (3646) You can compare strings in many ways under VB.NET: by using the = operator (or another comparison operator), with the Equals method (which the String class inherits from System.Object), or with the Compare shared method. The Compare method is especially useful because it returns an integer that tell ....Read More
Rating
Iterating over the characters in a string
Total Hit (2858) Visual Basic .NET strings support the For Each statement, so you can iterate over each individual character as follows: «Code LangId=2» Dim s As String = "ABCDE" Dim c As Char For Each c In s Console.Write(c & ".") ' => A.B.C.D.E. Next «/Code» However, you should bear in mind th ....Read More
Rating
Locale-aware string conversions
Total Hit (2747) You can use the usual UCase, LCase, and StrConv functions to convert a string to upper, lower, and titlecase (e.g. "This Is A Title"). However, VB.NET offers is much more flexible, and lets you convert the case of a string according the locale you specify. You can do this through the methods of the ....Read More
Rating
Process string faster with the StringBuilder class
Total Hit (2847) You can think of a StringBuilder object as a buffer that can contain a string with the ability to grow from zero characters to the buffer's current capacity. Until you exceed that capacity, the string is assembled in the buffer and no object is allocated or released. If the string becomes longer tha ....Read More
Rating
Reducing string memory usage with the Intern method
Total Hit (2971) A .NET application can optimize string management by maintaining an internal pool of string values known as intern pool. If the value being assigned to a string variable coincides with one of the strings already in the intern pool, no additional memory is created and the variable receives the addres ....Read More
Rating
Right-align formatted strings
Total Hit (3313) The String.Format function supports many formatting options, but none allows you to display right-aligned columns of numbers, as in: 1.00 12.00 123.00 1,234.00 However, you can easily create a helper function that works like String.Format, takes an additional length argument, ....Read More
Rating
Trimming strings
Total Hit (3055) Visual Basic .NET strings expose three trim methods: TrimStart, TrimEnd, and Trim - which trim one or more characters from the beginning, the end, or both the beginning and end of the string. They therefore work like VB6's LTrim, RTrim, and Trim functions, with an important difference: you can decid ....Read More
Rating
Parsing and validating string dates
Total Hit (2752) If you have a string variable that should specify a date (asked in input to the user, for example), you can parse the string and get a Date variable by using the Date.Parse method. If the input string is not in a valid format, this method throws an exception though. Follows a routine that parses a s ....Read More
Rating
Weekday names in any language
Total Hit (2335)
Rating
Convert a binary, octal, or hexadecimal value to decimal
Total Hit (4001) The Convert class offers a few static methods that let you easily and quickly convert a binary, octal, or hexadecimal number(stored in a String) into the equivalent Byte, Short, Integer, or Long value. These are the methods in question: «Code LangId=2»Dim b As Byte = Convert.ToByte(value, fromB ....Read More
Rating
Convert a decimal value to binary, octal, or hexadecimal
Total Hit (6020) The ToString method of the Convert class lets you easily and quickly convert a decimal value into a string representation of that number to binary, octal, or hexadecimal base: «Code LangId=2»' convert to binary Console.WriteLine(Convert.ToString(11, 2)) ' => 1011 ' convert to octal Console.W ....Read More
Rating
MK? And CV? - Convert numbers to strings and back
Total Hit (9706) The following routines convert a numeric value into a string that represents the number, and vice versa. They are useful for reading data written by QuickBasic programs, because the QuickBasic language functions that did the conversions were not ported to Visual Basic. Points to note: 1. These ....Read More
Rating
Take advantage of the new math functions
Total Hit (3001) The System.Math class exposes several static methods that let you perform many common operations. These functions replace the VB6 functions with same name, but there are a few new functions that have no direct VB6 counterpart: Ceiling(x) returns the integer equal or higher than the argument Floo ....Read More
Rating
Using aliases to quickly change the type of variables
Total Hit (3152) It may happen that you have to define a lot of variable of some type, and you want the possibility to later change their type without manually change the declaration of all of them. You can't use a simple Find & Replace, because you don't want to change the type of ALL the variables of that original ....Read More
Rating
Write applications that take arguments
Total Hit (3864) C# has a nice feature that VB.NET lacks: the ability to define a Main procedure that takes an array of strings, each one containig one of the arguments passed on the command line. It's easy to mimick this feature in VB, though. In fact, while the Command function is still supported in VB.NET, you ....Read More
Rating


(Page 55 of 133) 3985 Result(s) found  ... 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ...

Recommanded Links

 

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.