View on GitHub

SARAFF SOFTWARE

All products / Saraff.Twain.NET / Contents

Capability Containers

Capabilities exist in many varieties but all have a Default Value, Current Value, and may have other values available that can be supported if selected. To help categorize the supported values, Saraff.Twain.NET defines four types of containers for capabilities.

var _cap=this._twain32.GetCap(TwCap.Contrast);
if(_cap is Twain32.Enumeration) {
    // TWON_ENUMERATION
} else if(_cap is Twain32.Range) {
    // TWON_RANGE
} else if(_cap is object[]) {
    // TWON_ARRAY
} else {
    // TWON_ONEVALUE
}