# StreamId.Create(ReadOnlySpan&lt;byte&gt;, ReadOnlySpan&lt;byte&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.runtime.streamid/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.runtime.streamid/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/StreamId.cs)

```csharp
public static StreamId Create(ReadOnlySpan<byte> ns, ReadOnlySpan<byte> key)
```

Initializes a new instance of the [StreamId](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.runtime.streamid/) struct.

### Parameters

- `ns` (`ReadOnlySpan<byte>`): The namespace.
- `key` (`ReadOnlySpan<byte>`): The key.
