> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class GreaterThanZeroAttribute

Namespace: [VM.Models.Pre](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre)\
Assembly: VM.Models.Pre.dll

This class implements attribute for Limit > 0.

```csharp theme={null}
[Aspect(Scope.Global)]
[AttributeUsage(AttributeTargets.Method)]
[Injection(typeof(GreaterThanZeroAttribute))]
public class GreaterThanZeroAttribute : ValidationAttribute
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Attribute](https://learn.microsoft.com/dotnet/api/system.attribute) ←
ValidationAttribute ←
[GreaterThanZeroAttribute](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.GreaterThanZeroAttribute.md)

#### Inherited Members

ValidationAttribute.CheckValidationCore(Attribute\[], MethodBase, object\[]),
ValidationAttribute.ValidationCondition(ValidationAttribute, string, object),
ValidationAttribute.ExecuteException(string),
ValidationAttribute.Names

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### GreaterThanZeroAttribute()

Initializes a new instance of the [GreaterThanZeroAttribute](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.GreaterThanZeroAttribute.md) class.

```csharp theme={null}
public GreaterThanZeroAttribute()
```

### GreaterThanZeroAttribute(params string\[])

Initializes a new instance of the [GreaterThanZeroAttribute](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.GreaterThanZeroAttribute.md) class.

```csharp theme={null}
public GreaterThanZeroAttribute(params string[] names)
```

#### Parameters

`names` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

The target names

## Fields

### \_\_a\$\_instance

```csharp theme={null}
public static readonly GreaterThanZeroAttribute __a$_instance
```

#### Field Value

[GreaterThanZeroAttribute](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.GreaterThanZeroAttribute.md)

## Methods

### CheckValidation(MethodBase, object\[], Attribute\[])

Check validation.

```csharp theme={null}
[Advice(Kind.Before, Targets = Target.Any)]
public void CheckValidation(MethodBase method, object[] argument, Attribute[] triggers)
```

#### Parameters

`method` [MethodBase](https://learn.microsoft.com/dotnet/api/system.reflection.methodbase)

The method.

`argument` [object](https://learn.microsoft.com/dotnet/api/system.object)\[]

The argument.

`triggers` [Attribute](https://learn.microsoft.com/dotnet/api/system.attribute)\[]

The triggers

### ExecuteException(string)

Execute exception.

```csharp theme={null}
protected override void ExecuteException(string name)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The argument name.

### ValidationCondition(ValidationAttribute, string, object)

validation condition.

```csharp theme={null}
protected override bool ValidationCondition(ValidationAttribute attribute, string paramName, object argument)
```

#### Parameters

`attribute` ValidationAttribute

The attribute.

`paramName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The parameter name.

`argument` [object](https://learn.microsoft.com/dotnet/api/system.object)

The argument.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag for success.
