# Call StartRecording method in Zoom Windows SDK C# Wrapper

**URL:** <https://devforum.zoom.us/t/call-startrecording-method-in-zoom-windows-sdk-c-wrapper/24382>\
**Category:** Windows\
**Created:** [July 17, 2020, 3:04am UTC](https://devforum.zoom.us/t/call-startrecording-method-in-zoom-windows-sdk-c-wrapper/24382 "2020-07-17T03:04:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajithkahawatta](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sajithkahawatta](https://devforum.zoom.us/u/sajithkahawatta)\
**Post date:** [July 17, 2020, 3:04am UTC](https://devforum.zoom.us/t/call-startrecording-method-in-zoom-windows-sdk-c-wrapper/24382/1 "2020-07-17T03:04:34Z")

</div>

**Description**  
I am trying to call StartRecording function from C#. the definition in C# is,  
StartRecording(ref ValueType startTimestamp, string recPath);

When I try to call as,  
`DateTime now = DateTime.Now; ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap() .GetMeetingRecordingController().StartRecording(ref now, "path to file");`

I am getting compiling error,  
`Error CS1503 Argument 1: cannot convert from 'ref System.DateTime' to 'ref System.ValueType'`

How can I call the StartRecording method from C#?

**Which version?**  
v5.0.24433.0616

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 1, 2020, 4:41am UTC](https://devforum.zoom.us/t/call-startrecording-method-in-zoom-windows-sdk-c-wrapper/24382/2 "2020-08-01T04:41:11Z")

</div>

Hi @sajithkahawatta,

Thanks for the post. As the error message has mentioned, the `startRecording` interface is expecting a `ref System.ValueType` where the parameter you are passing is `ref System.DateTime`.

The following links could be helpful:

- [https://stackoverflow.com/questions/45045369/cannot-convert-from-object-to-system-valuetype](https://stackoverflow.com/questions/45045369/cannot-convert-from-object-to-system-valuetype)
- [https://stackoverflow.com/questions/51878024/cannot-convert-from-out-system-datetime-to-out-system-datetime](https://stackoverflow.com/questions/51878024/cannot-convert-from-out-system-datetime-to-out-system-datetime)
- [https://docs.microsoft.com/en-us/dotnet/api/system.valuetype?view=netcore-3.1](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype?view=netcore-3.1)

Thanks!
