Returns the index of the first occurrence of a Processor object whose name matches the given string.
public int IndexOf(string name)
Public Overloads Function IndexOf( _ByVal name As String _) As Integer
public:int IndexOf(String^ name)
name
A string value representing the name of the Processor to find.
The zero-based index position of the Processor item found, or -1 if not found.
Returns the index of the first occurrence of a Processor object whose name matches the given string.
using Leadtools;using Leadtools.MediaFoundation;using LeadtoolsMediaFoundationExamples.Fixtures;public bool _result = false;public PlayCtrlForm _form = new PlayCtrlForm();public void IndexOfExample(){// reference the play controlPlayCtrl playctrl = _form.PlayCtrl;try{// get the play controls available audio processorsAudioProcessors allProcs = playctrl.AudioProcessors;// get the play controls selected audio processorsAudioProcessors selProcs = playctrl.SelectedAudioProcessors;// get index of LEAD MF Volume Transformint nIndex = allProcs.IndexOf("{E2B7DC41-38C5-11D5-91F6-00104BDB8FF9}");// get LEAD MF Volume TransformProcessor AudProc = allProcs[nIndex];// add the LEAD MF Volume Transform to the selected audio processorsselProcs.Add(AudProc);// get the index of added audio processorint i = selProcs.IndexOf(AudProc);// set the result to what we expect_result = (selProcs[i] == AudProc);}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MediaFoundationImports LeadtoolsMediaFoundationExamples.FixturesPublic _result As Boolean = FalsePublic _form As PlayCtrlForm = New PlayCtrlForm()Public Sub IndexOfExample()' reference the play controlDim playctrl As PlayCtrl = _form.PlayCtrlTry' get the play controls available audio processorsDim allProcs As AudioProcessors = playctrl.AudioProcessors' get the play controls selected audio processorsDim selProcs As AudioProcessors = playctrl.SelectedAudioProcessors' get index of LEAD MF Volume TransformDim nIndex As Integer = allProcs.IndexOf("{E2B7DC41-38C5-11D5-91F6-00104BDB8FF9}")' get LEAD MF Volume TransformDim AudProc As Processor = allProcs(nIndex)' add the LEAD MF Volume Transform to the selected audio processorsselProcs.Add(allProcs(nIndex))' get the index of added audio processorDim i As Integer = selProcs.IndexOf(allProcs(nIndex))' set the result to what we expect_result = (selProcs(i) Is AudProc)Catch e1 As Exception_result = FalseEnd TryEnd Sub
|
Products |
Support |
Feedback: IndexOf(String) Method - Leadtools.MediaFoundation |
Introduction |
Help Version 19.0.2017.6.16
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.