CSharpTest.Net
UsageCounter Constructor(String)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Threading Namespace > UsageCounter Class > UsageCounter Constructor : UsageCounter Constructor(String)

name

Glossary Item Box

The name used for the global object

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal name As String _
)
C# 
public UsageCounter( 
   string name
)

Parameters

name

Example

Library/Library.Test/TestUsageCounter.cs

C#Copy Code
using (UsageCounter counter = new UsageCounter("some global name"))
    Assert.AreEqual("some global name", counter.Name);
using (UsageCounter counter = new UsageCounter(@"{0}\Item-{1}", "Global", 1))
    Assert.AreEqual(@"Global\Item-1", counter.Name);
VB.NETCopy Code
Using counter As New UsageCounter("some global name")
    Assert.AreEqual("some global name", counter.Name)
End Using
Using counter As New UsageCounter("{0}\Item-{1}", "Global", 1)
    Assert.AreEqual("Global\Item-1", counter.Name)
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