Implementing IClonable – Shallow copies
An object that want to support cloning should implement the ICloneable interface. This interface exposes only one method, Clone, which returns a copy of the object. The ICloneable specifics don’t
An object that want to support cloning should implement the ICloneable interface. This interface exposes only one method, Clone, which returns a copy of the object. The ICloneable specifics don’t
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: ‘ This
The simplest way to create a generic deep copy routine, that is a procedure that can create a true, distinct copy of an object and all its dependent object, is
The GetFiles and GetDirectories methods of the System.IO.Directory class can take an argument containing wildcards, to filter the result: ‘ Display all the *.txt files in C:DOCS.Dim fname As StringFor
In Visual Basic .NET you read a text file by first opening a StreamReader on it, and then iterating over all its lines until its Peek method returns -1: Dim
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,
It was and it is still easy to debug MTS components written on Visual C++ version 5 and higher. Debugging components written on Visual Basic 5 is possible under VC
This Tip applies to Microsoft .NET Framework. using System; using System.Text.RegularExpressions; public class CustomValidations { public CustomValidations() { } /// /// This method is used for validating _the string and
The following script works fine in IE4 or above: Enable Tab in Textarea