Class RandomBytes
Random byte sequence generators.
Inheritance
System.Object
    RandomBytes
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Lucene.Net.Randomized.Generators
Assembly: Lucene.Net.TestFramework.dll
Syntax
public static class RandomBytes
  Methods
| Improve this Doc View SourceRandomBytesOfLength(Random, Int32)
Declaration
public static byte[] RandomBytesOfLength(Random r, int length)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Random | r | Random generator.  | 
      
| System.Int32 | length | The length of the byte array. Can be zero.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Byte[] | Returns a byte array with random content.  | 
      
RandomBytesOfLengthBetween(Random, Int32, Int32)
Declaration
public static byte[] RandomBytesOfLengthBetween(Random r, int minLength, int maxLength)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Random | r | Random generator.  | 
      
| System.Int32 | minLength | The minimum length of the byte array. Can be zero.  | 
      
| System.Int32 | maxLength | The maximum length of the byte array. Can be zero.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Byte[] | Returns a byte array with random content.  |