My current code is using Array.ConvertAll, which i need to migrate to net core. How to migrate it to work in Net core.
Can we use foreach statement with custom conversion code to handle the conversion?
But i dont know how to do it, Any help appreciated.
private DA.PBInformation[] ConvertInfo(Wsdl.Info_Type[] originalType) { DA.PBInformation[] sapRPInfo= null; if (originalType != null) { sapRPInfo= Array.ConvertAll<Wsdl.Info_Type, DA.PBInformation>(originalType, (Wsdl.Info_Type wsdlAltInfo) => { var pkInfo = new DA.PBInformation(); pkInfo.BfCode = wsdlAltInfo.APkAllType; if ( wsdlAltInfo.MaxCountSpecified ) { pkInfo.NumAll = (int)( wsdlAltInfo.MaxCount ); } if ( wsdlAltInfo.LCountSp ) { pknfo.NumAll = (int)( wsdlAltInfo.LCount ); } return pkInfo; }); } return sapRPInfo; }