UtilDebugEvaluateStructureInstanceSize Method
Determines whether the instance size (in bytes) of a Structure (ValueType) is smaller
and/or greater than the size recommended by Microsoft guidelines.
Namespace: DevCase.Core.Diagnostics.Debugging.CommonAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool EvaluateStructureInstanceSize(
ValueType struct,
ref string refMessage
)
Public Shared Function EvaluateStructureInstanceSize (
struct As ValueType,
ByRef refMessage As String
) As Boolean
Dim struct As ValueType
Dim refMessage As String
Dim returnValue As Boolean
returnValue = UtilDebug.EvaluateStructureInstanceSize(struct,
refMessage)
public:
static bool EvaluateStructureInstanceSize(
ValueType^ struct,
String^% refMessage
)
static member EvaluateStructureInstanceSize :
struct : ValueType *
refMessage : string byref -> bool
No code example is currently available or this language may not be supported.
- struct ValueType
-
The source Structure (ValueType) to evaluate.
- refMessage String
-
When the function returns, it contains a detailed message about the size of the source Structure.
Boolean if the size of the source Structure is between the
minimum and maximum recommended size by Microsoft guidelines;
otherwise.
This is a code example.
No code example is currently available or this language may not be supported.
' Declare a simple Structure.
Public Structure MyStructure
Public Field1 As Object
Public Field2 As Object
Public Field3 As Object
Public Field4 As Object
' Public Field5 As Object
End Structure
' Test the Structure size.
Dim struct As New MyStructure()
Dim message As String = String.Empty
Dim result As Boolean = EvaluateStructureInstanceSize(struct, message)
Debug.WriteLine(String.Format("Passed: {0}; Message: {1}", result, message))
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.