CSharpTest.Net
Name Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Threading Namespace > UsageCounter Class : Name Property

Glossary Item Box

Returns the name specified when this instance was created

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Name As String
C# 
public string Name {get;}

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