You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sequenze edited this page Jun 16, 2017
·
6 revisions
Provides the primitives required to define a pattern.
Inheritance Hierarchy
Object
Syntax
publicabstractinterfaceIPattern:IFields
Properties
Name
Description
Size
Returns the size of the pattern.
Item[Int32]
Gets or sets the i'th element of the pattern.
Remarks
IPattern is the base interface of all patterns.
Examples
The following example demonstrates the usage of IPattern for fetching data from a tuple space.
staticvoidMain(string[]args){FifoSpacefridge=newFifoSpace();fridge.Put("Milk",3);IPatternpattern=newPattern("Milk",typeof(int));ITupleresult=fridge.Query(pattern);Console.WriteLine("The fridge has {0} bottles of {1}",result[1],result[0]);Console.Read();}/* The following is printed to the console: The fridge has 3 bottles of Milk */