---
title: "MapiTask.FromVTodo"
url: "https://reference.aspose.com/email/net/aspose.email.mapi/mapitask/fromvtodo/"
product: "Aspose.Email for .NET API Reference"
description: "MapiTask method. Loads a task from an iCalendar .ics file with a VTODO"
---

## FromVTodo(string) {#fromvtodo_2}

Loads a task from an iCalendar (.ics) file with a VTODO.

```csharp
public static MapiTask FromVTodo(string filePath)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filePath | String | The path of the file. |

### Return Value

The loaded task.

### See Also

* class [MapiTask](../)
* namespace [Aspose.Email.Mapi](../../mapitask/)
* assembly [Aspose.Email](../../../)

---

## FromVTodo(string, bool) {#fromvtodo_3}

Loads a task from an iCalendar (.ics) file with a VTODO, optionally detecting the encoding.

```csharp
public static MapiTask FromVTodo(string filePath, bool detectEncoding)
```

| Parameter | Type | Description |
| --- | --- | --- |
| filePath | String | The path of the file. |
| detectEncoding | Boolean | `true` to detect the encoding of the data from its byte order mark (BOM). |

### Return Value

The loaded task.

### See Also

* class [MapiTask](../)
* namespace [Aspose.Email.Mapi](../../mapitask/)
* assembly [Aspose.Email](../../../)

---

## FromVTodo(Stream) {#fromvtodo}

Loads a task from a stream that contains an iCalendar VTODO.

```csharp
public static MapiTask FromVTodo(Stream stream)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | The stream to read. |

### Return Value

The loaded task.

### See Also

* class [MapiTask](../)
* namespace [Aspose.Email.Mapi](../../mapitask/)
* assembly [Aspose.Email](../../../)

---

## FromVTodo(Stream, bool) {#fromvtodo_1}

Loads a task from a stream that contains an iCalendar VTODO, optionally detecting the encoding.

```csharp
public static MapiTask FromVTodo(Stream stream, bool detectEncoding)
```

| Parameter | Type | Description |
| --- | --- | --- |
| stream | Stream | The stream to read. |
| detectEncoding | Boolean | `true` to detect the encoding of the data from its byte order mark (BOM). |

### Return Value

The loaded task.

### See Also

* class [MapiTask](../)
* namespace [Aspose.Email.Mapi](../../mapitask/)
* assembly [Aspose.Email](../../../)


