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

# AL0007 - GetSchema should be explicitly implemented

> Implement IXmlSerializable.GetSchema explicitly to avoid exposing it as part of the public API

Source: [AL0007ToAL0009IXmlSerializableAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/AL0007ToAL0009IXmlSerializableAnalyzer.cs)

## Description

Implement IXmlSerializable.GetSchema explicitly to avoid exposing it as part of the public API.

## Bad Code

```csharp theme={null}
public XmlSchema? GetSchema() => null;
```

## Good Code

```csharp theme={null}
XmlSchema? IXmlSerializable.GetSchema() => null;
```

## Properties

* **Category**: Usage
* **Severity**: Error
* **Enabled by default**: True
* **Code fix available**: False

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0007.severity = warning
```
