/// <param name="optional">Optional paramaters.</param> /// <returns>ChannelListResponseResponse</returns> public static ChannelListResponse List(YouTubeService service, string part, ChannelsListOptionalParms optional = null) { try { // Initial validation. if (service == null) throw new ArgumentNullException("service"); if (part == null) throw new ArgumentNullException(part); // Building the initial request. var request = service.Channels.List(part); // Applying optional parameters to the request. request = (ChannelsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return request.Execute(); } catch (Exception ex) { throw new Exception("Request Channels.List failed.", ex); } }