--- title: "How to: Determine Whether a Freezable Is Frozen" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "Freezable objects [WPF], determining if frozen" ms.assetid: 92e58baa-ee12-4a9e-ac3a-ca458807a8b2 --- # How to: Determine Whether a Freezable Is Frozen This example shows how to determine whether a object is frozen. If you try to modify a frozen object, it throws an . To avoid throwing this exception, use the property of the object to determine whether it is frozen. ## Example The following example freezes a and then tests it by using the property to determine whether it is frozen. [!code-csharp[freezablesample_procedural#CheckIsFrozenExample](~/samples/snippets/csharp/VS_Snippets_Wpf/freezablesample_procedural/CSharp/freezablesample.cs#checkisfrozenexample)] [!code-vb[freezablesample_procedural#CheckIsFrozenExample](~/samples/snippets/visualbasic/VS_Snippets_Wpf/freezablesample_procedural/visualbasic/freezablesample.vb#checkisfrozenexample)] For more information about objects, see the [Freezable Objects Overview](freezable-objects-overview.md). ## See also - - - [Freezable Objects Overview](freezable-objects-overview.md) - [How-to Topics](base-elements-how-to-topics.md)