Constructors

Constructors


Functions used to create fully inititalized objects.


Public:

Methods:

NameDescription
 CreateEnumerator Creates a For..Each compatible wrapper around an IEnumerator interface.  
 NewApplicationException Creates a new ApplicationException object.  
 NewArgumentException Creates a new ArgumentException object.  
 NewArgumentNullException Creates a new ArgumentNullException object.  
 NewArgumentOutOfRangeException Creates a new ArgumentOutOfRangeException object.  
 NewArithmeticException Initializes a new instance of the ArithmeticException class with a specified error message and a reference to the inner exception that is the cause of this exception.  
 NewArray Creates an array of values.  
 NewArrayList Creates a new ArrayList object with the specified settings.  
 NewArrayTypeMismatchException Creates a new ArrayTypeMismatchException object.  
 NewBigInteger Creates a new BigInteger instance.  
 NewBinaryReader Returns a new BinaryReader that can read from the specified stream usind the specified encoding.  
 NewBinaryWriter Returns a new BinaryWriter used to write to a Stream object.  
 NewBitArray Creates a new BitArray object.  
 NewBooleans Initializes a Boolean array with elements copied from Values.  
 NewBytes Initializes a Byte array with elements copied from Values.  
 NewCaseInsensitiveComparer Initializes a new instance of the CaseInsensitiveComparer class using the specified CultureInfo.  
 NewCharEnumerator Creates an enumerator used to iterate over the Unicode characters of a String.  
 NewChars Initializes an Integer array representing Unicode characters with elements copied from Values.  
 NewCollection Initializes a Collection with elements copied from Values.  
 NewComparer Initializes a new instance of the Comparer class using the specified CultureInfo.  
 NewConsoleKeyInfo Initializes a new ConsoleKeyInfo object that represents the state of a key press.  
 NewCryptoAPIHash Creates a new CryptoAPIHash object.  
 NewCryptographicException Creates a new CryptographicException object.  
 NewCryptoStream Creates a new CryptoStream object used to read or write transformed data to or from an underlying stream.  
 NewCspKeyContainerInfo Creates a new CspKeyContainerInfo object.  
 NewCspParameters Creates a new CspParameters object.  
 NewCultureInfo Creates a new CultureInfo object for the specified culture.  
 NewCurrencies Initializes a Currency array with elements copied from Values.  
 NewDate Creates a new CorDateTime object from a VB Date.  
 NewDates Initializes a Date array with elements copied from Values.  
 NewDateTime Creates a new CorDateTime object set to the specified date.  
 NewDayLightTime Creates a new DayLightTime object with the specified start and end times for daylight saving.  
 NewDecimals Initializes a Decimal array with elements copied from Values.  
 NewDecoderFallbackException Initializes a new instance of the DecoderFallbackException class. Parameters specify the error message and the inner exception that is the cause of this exception.  
 NewDecoderFallbackException2 Initializes a new instance of the DecoderFallbackException class. Parameters specify the error message, the array of bytes being decoded, and the index of the byte that cannot be decoded.  
 NewDecoderReplacementFallback Initializes a new instance of the DecoderReplacementFallback class using a specified replacement string.  
 NewDecoderReplacementFallbackBuffer Initializes a new instance of the DecoderReplacementFallbackBuffer class using the value of a DecoderReplacementFallback object.  
 NewDictionaryEntry Creates a new DictionaryEntry object initialized with Key and Value.  
 NewDirectoryInfo Creates a new DirectoryInfo object that describes the specified path.  
 NewDirectoryNotFoundException Creates a new DirectoryNotFoundException object with the specified message and optional exception.  
 NewDivideByZeroException Initializes a new instance of the DivideByZeroException class with a specified error message and a reference to the inner exception that is the cause of this exception.  
 NewDoubles Initializes a Double array with elements copied from Values.  
 NewDriveInfo Initializes a new DriveInfo object used to inspect a drives information.  
 NewDriveNotFoundException Initializes a new instance of the DriveNotFoundException class with the specified error message and a reference to the inner exception that is the cause of this exception.  
 NewDSACryptoServiceProvider Creates a new DSACryptoServiceProvider object.  
 NewEncoderFallbackException Initializes a new instance of the EncoderFallbackException class. Parameters specify the error message and the inner exception that is the cause of this exception.  
 NewEncoderFallbackException2 Initializes a new instance of the EncoderFallbackException class. Parameters specify the error message, unknown character, and index.  
 NewEncoderFallbackException3 Initializes a new instance of the EncoderFallbackException class. Parameters specify the error message, high surrogate, low surrogate, and Index.  
 NewEncoderReplacementFallback Initializes a new instance of the EncoderReplacementFallback class using a specified replacement string.  
 NewEncoderReplacementFallbackBuffer Initializes a new instance of the EncoderReplacementFallbackBuffer class using the value of a EncoderReplacementFallback object.  
 NewEndOfStreamException Returns a new EndOfStreamException with the specified message and optional exception.  
 NewEnumeratorBase Initializes a new instance of EnumeratorBase.  
 NewException Creates a new Exception object.  
 NewExceptionBase Creates a new ExceptionBase object that can be contained within an exception class.  
 NewExternalException Creates a new ExternalException object.  
 NewFileInfo Creates a new FileInfo object used to describe and manage a file.  
 NewFileNotFoundException Creates a new FileNotFoundException with the specified FileName, Message, and InnerException.  
 NewFileStream Returns a new FileStream to access an underyling file.  
 NewFileStreamWithHandle Returns a new FileStream to access a file other than that on disk, such as pipes.  
 NewFormatException Creates a new FormatException object.  
 NewFromBase64Transform Creates a new FromBase64Transform object used to convert base64 characters to plain text.  
 NewGregorianCalendar Creates a new instance of the GregorianCalendar class.  
 NewGuid Initializes a new instance of the Guid object by using the specified array of bytes, string, or memory pointer.  
 NewHashAlgorithmBase Creates a HashAlgorithmBase object used by hash algorithms.  
 NewHashtable Initializes a new instance of the Hashtable class by copying the elements from the specified dictionary to the new Hashtable object. The new Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor and IEqualityComparer object.  
 NewHashtable2 Initializes a new, empty instance of the Hashtable class using the specified initial capacity, load factor, and IEqualityComparer object.  
 NewHMACBase Creates a HMACBase object that can be used as a base implementation of an HMAC class.  
 NewHMACMD5 Creates a new HMACMD5 object.  
 NewHMACRIPEMD160 Creates a new HMACRIPEMD160 object.  
 NewHMACSHA1 Creates a new HMACSHA1 object.  
 NewHMACSHA256 Creates a new HMACSHA256 object.  
 NewHMACSHA384 Creates a new HMACSHA384 object.  
 NewHMACSHA512 Creates a new HMACSHA512 object.  
 NewIndexOutOfRangeException Creates a new IndexOutOfRangeException object.  
 NewIniFile Initializes a new IniFile to manage an INI file.  
 NewIniResourceWriter Initializes a new instance of IniResourceWriter with specified FileName and Section.  
 NewInt64 Returns an initialized instance of Int64.  
 NewInt64s Initializes an Int64 array with elements copied from Values.  
 NewIntegers Initializes an Integer array with elements copied from Values.  
 NewInvalidCastException Creates a new InvalidCaseException object.  
 NewInvalidOperationException Creates a new InvalidOperationException object.  
 NewIOException Creates a new IOException object with the specified Message, HResult, and InnerException.  
 NewKeySizes Creates a new KeySizes object with the MinSize, MaxSize, and SkipSize properties defined.  
 NewLongs Initializes a Long array with elements copied from Values.  
 NewMACTripleDES Creates a new MACTripleDES object.  
 NewMemoryStream Initializes a new instance of the MemoryStream class based on the specified region of a byte array, with the CanWrite property set as specified.  
 NewNotSupportedException Creates a new NotSupportedException object.  
 NewObjectDisposedException Returns a new ObjectDisposedException.  
 NewOperatingSystem Returns a new OperatingSystem object with the specified Platform and Version.  
 NewOverflowException Returns a new OverflowException with the specified message and exception.  
 NewPathTooLongException Returns a new PathTooLongException object.  
 NewPictureResourceGroup Creates a picture group object used to contain information about resources that are grouped together.  
 NewPictureResourceInfo Initializes a new instance of the PictureResourceInfo class with the specified ResourceId and Resource.  
 NewPlatformNotSupportedException Returns a new PlatformNotSupportedException with the specified Message and InnerException.  
 NewQueue Creates a new Queue initialized with the elements in the collection.  
 NewRandom Creates a new Random object initialized with the specified seed.  
 NewRankException Creates a new RankException object.  
 NewResourceKey Creates a new ResourceKey object used to uniquely identify a resource.  
 NewResourceManager Creates a new ResourceManager for a specified .RES file.  
 NewResourceReader Creates a new ResourceReader object.  
 NewResourceSet Creates a new ResourceSet for a specific culture.  
 NewResourceWriter Creates a new ResourceWriter object.  
 NewRfc2898DeriveBytes Initializes a new instance of the Rfc2898DeriveBytes class using a password, a salt or salt size, and number of iterations to derive the key.  
 NewRNGCryptoServiceProvider Creates a new RNGCryptoServiceProvider that uses a crypto service provider to generate random numbers.  
 NewRSACryptoServiceProvider Creates a new RSACryptoServiceProvider object.  
 NewSafeFileHandle Initializes a new instance of the SafeFileHandle class.  
 NewSafeHandle Initializes a new instance of the SafeHandle class.  
 NewSecurityElement Creates a new SecurityElement object.  
 NewSerializationException Creates a new SerializationException object.  
 NewSingles Initializes a Single array with elements copied from Values.  
 NewSortedList Creates a new SortedList object with specific initialization options.  
 NewStack Initializes a new instance of the Stack class that contains elements copied from the specified collection.  
 NewStreamReader Creates a new StreamReader from either a FileName or an existing stream to read from.  
 NewStreamWriter Creates a new StreamWriter with either a filename or other stream as a source to write to in the specified Encoding.  
 NewString Initializes a new String to the value indicated by an array of Unicode characters, a starting character position within that array, and a length.  
 NewStringBuilder Returns a new StringBuilder with user specified settings and starting string.  
 NewStringReader Returns a new StringReader object.  
 NewStrings Initializes a String array with elements copied from Values.  
 NewStringWriter Returns a new StringWriter object.  
 NewSystemException Creates a new SystemException object.  
 NewTicker Creates a new Ticker.  
 NewTime Initializes a new TimeSpan representing the time portion of a date.  
 NewTimeSpan Creates a new TimeSpan object set to the specified amount of time.  
 NewUnauthorizedAccessException Creates a new UnauthorizedAccessException object.  
 NewUnicodeEncoding Returns a new UnicodeEncoding object with the specified settings.  
 NewUTF32Encoding Initializes a new instance of the UTF32Encoding class. Parameters specify whether to use the big endian byte order, whether to provide a Unicode byte order mark, and whether to throw an exception when an invalid encoding is detected.  
 NewUTF7Encoding Returns a new UTF7Encoding object.  
 NewUTF8Encoding Returns a new UTF8Encoding object.  
 NewVariants Initializes a Variant array with elements copied from Values.  
 NewVersion Creates a new Version object with specified version information.  
 NewWinResourceReader Creates a new WinResourceReader object.  
 NewXmlSyntaxException Creates a new XmlSyntaxException object.  

Remarks

This class is defined as Global-Multiuse. All of the functions can be called directly without needing to create a Constructors object.

The Cor accessor can be used to easily find and select the desired object to create. Using the Cor accessor provides IntelliSense to the available constructors, making object creation easier.

Examples

The example demonstrates instantiating a FileStream object using two methods.

Public Sub Main()
    Dim FS As FileStream
    
    ' open file using global method.
    Set FS = NewFileStream("MyFile.txt", FileMode.OpenExisting)
    
    ' open file using global Cor accessor.
    Set FS = Cor.NewFileStream("MyFile.txt", FileMode.OpenExisting)
End Sub

See Also

Project CorLib Overview

Class Constructors Overview