DfsExtensionsSearch Method (IDfsFile, DateTime) | 
 
            Searches the dfs file for the time step index of a time, 
            and returns the zero-based time step index. The time axis of the file
            must be a calendar type time axis
            
            NOTE: For the non-equidistant time axes, the metod will read the first item 
            in the file for a number of timesteps in random order, performing a binary 
            search in the file data on disc. This will be slow if used many times on the same file.
            In such a case, use the lazy version of GetDateTimes(IDfsFile, Boolean) or 
            GetDateTimes(IDfsFile, DateTime, Boolean).
            
            For the equidistant time axis, the method will calculate the time step index
            directly without reading data from the file.
            
 
    Namespace: 
   DHI.Generic.MikeZero.DFS
    Assembly:
   DHI.Generic.MIKEZero.DFS (in DHI.Generic.MIKEZero.DFS.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntaxpublic static int Search(
	this IDfsFile dfsFile,
	DateTime time
)
<ExtensionAttribute>
Public Shared Function Search ( 
	dfsFile As IDfsFile,
	time As DateTime
) As Integer
public:
[ExtensionAttribute]
static int Search(
	IDfsFile^ dfsFile, 
	DateTime time
)
[<ExtensionAttribute>]
static member Search : 
        dfsFile : IDfsFile * 
        time : DateTime -> int 
Parameters
- dfsFile
 - Type: DHI.Generic.MikeZero.DFSIDfsFile
Dfs file to search in - time
 - Type: SystemDateTime
The time to locate. 
Return Value
Type: 
Int32
            The zero-based index of the time in the dfs file, if time is found. 
            Otherwise, the negative number that is the bitwise complement 
            of the time step interval number, i.e. index of the next element 
            that is larger than the time or, if there is no larger element, 
            the bitwise complement of the number of time steps.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
IDfsFile. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
See Also