CSharpTest.Net
GetValues() Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Data Namespace > CsvReader Class > GetValues Method : GetValues() Method

Glossary Item Box

Returns an object[] containing all the strings for the current record.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetValues() As Object()
C# 
public object[] GetValues()

Example

Library/Library.Test/TestCsvReader.cs

C#Copy Code
using (CsvReader r = new CsvReader(new StringReader(CSV_DOC1)))
{
    r.Read();
    Assert.AreEqual("1a", r["f1"]);
    Assert.AreEqual("1b", r[1]);
    Assert.AreEqual("1c", r.GetString(2));
    Assert.AreEqual("1c", r.GetValues()[2]);
}
VB.NETCopy Code
Using r As New CsvReader(New StringReader(CSV_DOC1))
    r.Read()
    Assert.AreEqual("1a", r("f1"))
    Assert.AreEqual("1b", r(1))
    Assert.AreEqual("1c", r.GetString(2))
    Assert.AreEqual("1c", r.GetValues()(2))
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys