Could you please tell me you were talling about Windows IoT Core on Raspberry Pi? If yes, you can refer to this link which lists the supported cameras on Windows IoT Core, and here is a sample which is written by C#, the sample uses Microsoft Lifecam to capture device, record video to a file, preview video feed, and playback recorded video.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.