# FieldAccessor Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.utilities.fieldaccessor/)

## GetGetter(Type, string) {#getgetter-system-type-string-46bb62f9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.utilities.fieldaccessor/methods/getgetter-system-type-string-46bb62f9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Utilities/FieldAccessor.cs#L34)

```csharp
public static Delegate GetGetter(Type declaringType, string fieldName)
```

Returns a delegate to get the value of a specified field.

### Parameters

- `declaringType` (`Type`)
- `fieldName` (`string`)

### Returns

A delegate to get the value of a specified field.

## GetReferenceSetter(Type, string) {#getreferencesetter-system-type-string-5f663cbc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.utilities.fieldaccessor/methods/getreferencesetter-system-type-string-5f663cbc/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Utilities/FieldAccessor.cs#L62)

```csharp
public static Delegate GetReferenceSetter(Type declaringType, string fieldName)
```

Returns a delegate to set the value of this field for an instance.

### Parameters

- `declaringType` (`Type`)
- `fieldName` (`string`)

### Returns

A delegate to set the value of this field for an instance.

## GetValueGetter(Type, string) {#getvaluegetter-system-type-string-4e4239ec}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.utilities.fieldaccessor/methods/getvaluegetter-system-type-string-4e4239ec/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Utilities/FieldAccessor.cs#L40)

```csharp
public static Delegate GetValueGetter(Type declaringType, string fieldName)
```

Returns a delegate to get the value of a specified field.

### Parameters

- `declaringType` (`Type`)
- `fieldName` (`string`)

### Returns

A delegate to get the value of a specified field.

## GetValueSetter(Type, string) {#getvaluesetter-system-type-string-1064ce80}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.utilities.fieldaccessor/methods/getvaluesetter-system-type-string-1064ce80/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Utilities/FieldAccessor.cs#L68)

```csharp
public static Delegate GetValueSetter(Type declaringType, string fieldName)
```

Returns a delegate to set the value of this field for an instance.

### Parameters

- `declaringType` (`Type`)
- `fieldName` (`string`)

### Returns

A delegate to set the value of this field for an instance.
