ZennoLab Assemblies Documentation
ColCount Property
Example 
Gets the number of columns actually contained in the table.
Syntax
int ColCount {get;}

Property Value

Type: System.Int32
The number of columns actually contained in the table.
Example
The following code example shows the value of the ColCount property at various points in the life of a table. First gets columns count from empty table, after adds a new row and gets columns count.
// get table by name "MyTable"
IZennoTable table = project.Tables["MyTable"];
 
// get columns count
int colCount = table.ColCount;
 
// set rows separator
table.ColSeparator = ":";
 
// add row to table
table.AddRow("one:two:three:four");
 
// get columns count
if (table.ColCount != colCount) return "Columns count was changed";
return "Columns count wasn't changed";
// get table by name "MyTable"
$table = $project->Tables->get_Item("MyTable");
 
// get columns count
$colCount = $table->ColCount;
 
// set rows separator
$table->ColSeparator = ":";
 
// add row
$table->AddRow("one:two:three:four");
 
// get columns count
if ($table->ColCount != $colCount) return "Columns count was changed";
return "Columns count wasn't changed";
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

IZennoTable Interface
IZennoTable Members
RowCount Property
ColSeparator Property

Send Feedback