# DeviceResources

Namespace: **Wisej.Hybrid**

Assembly: **Wisej.Hybrid** (3.5.0.0)

Provides methods for accessing resources embedded within the Hybrid client application.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DeviceResources
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DeviceResources
```

{% endtab %}
{% endtabs %}

Access this class through the [Device](/hybrid/start/api/general/wisej.hybrid.device.md) singleton.

## Constructors

### ![](/files/CCV9PPenlC1YZvNh1I6R)DeviceResources()

Initializes a new instance of [DeviceResources](/hybrid/start/api/storage/wisej.hybrid.deviceresources.md).

## Methods

### ![](/files/CCV9PPenlC1YZvNh1I6R)GetBytes(resource)

Gets a byte array of the given resource if it exists.

| Parameter    | Type                                                          | Description                                                      |
| ------------ | ------------------------------------------------------------- | ---------------------------------------------------------------- |
| **resource** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the resource or relative path from the project root. |

**Returns:** [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte). The resource byte array.

A HybridAsset: /Assets/image.png can be accessed using "image.png" if only one HybridAsset named "image.png" exists or "/Assets/image.png".

### ![](/files/CCV9PPenlC1YZvNh1I6R)GetStream(resource)

Gets a stream of the given resource if it exists.

| Parameter    | Type                                                          | Description                                                      |
| ------------ | ------------------------------------------------------------- | ---------------------------------------------------------------- |
| **resource** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The name of the resource or relative path from the project root. |

**Returns:** [MemoryStream](https://docs.microsoft.com/dotnet/api/system.io.memorystream). The resource stream.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/hybrid/start/api/storage/wisej.hybrid.deviceresources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
