Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Development Edition
 NameOperationResult Enumeration
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
NameOperationResult Enumeration

Updated: November 2007

NameProfile method returns NameOperationResult enum to indicate success or failure.

Namespace:  Microsoft.VisualStudio.Profiler
Assembly:  Microsoft.VisualStudio.Profiler (in Microsoft.VisualStudio.Profiler.dll)

Visual Basic (Declaration)
Public Enumeration NameOperationResult
Visual Basic (Usage)
Dim instance As NameOperationResult
C#
public enum NameOperationResult
Visual C++
public enum class NameOperationResult
JScript
public enum NameOperationResult
Member nameDescription
ErrorNoSupport The specified operation is not supported.
ErrorOutOfMemory Memory was not available to record the event.
ErrorInvalidName The name is invalid.
ErrorIdDoesNotExist The profiling element specified does not exist.
ErrorLevelDoesNotExist The profile level specified does not exist.
ErrorRedefinition A name was already assigned to the profile element. The name in this function is ignored.
ErrorTextTruncated The name text exceeded 32 characters including the null character and was therefore truncated.
OK Name was registered successfully.

The following example illustrates the NameOperationResult enumeration. The example uses a call to the DataCollection.NameProfile method to assign a value to the NameOperationResult enumeration.

        public void ExerciseNameOperationResult()
        {
            string profileName = "ExerciseNameProfile";

            // Declare enumeration to hold result of call to 
            // ExerciseNameProfle.
            NameOperationResult nameResult;

            nameResult =  DataCollection.NameProfile(
                profileName,
                ProfileLevel.Global,
                DataCollection.CurrentId);

            Console.WriteLine("NameProfile returned {0}", nameResult);
        }
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker