Referencing C# Workspace Assemblies from VB.Net, Warning Access of ... not evaluated
I found a C# code library and I'd like to use this class in VB.Net. Here are the steps I've taken so far.
1. In my VB.Net Rule I've referenced the C# assemblies.
2. In my VB.Net Rule I've created a new object for the C# class
'Create an object for the class defined in External Assembly (Toolbox) so we can use methods in the class
Dim XIRRWrapper As New OneStream.BusinessRule.Finance.XIRR.CalculationWrapper
3. Now I'm able to create objects in the C# referenced assemblies in VB.Net
Dim cashFlows = New List(Of OneStream.BusinessRule.Finance.XIRR.CashFlowDates ) From
{
New OneStream.BusinessRule.Finance.XIRR.CashFlowDates(-1000, New DateTime(2017, 1, 1)),
New OneStream.BusinessRule.Finance.XIRR.CashFlowDates(500, New DateTime(2017, 7, 1)),
New OneStream.BusinessRule.Finance.XIRR.CashFlowDates(507.5, New DateTime(2018, 1, 1))
}
4. And finally able to run a function (LINE 55 which produces a warning)
api.LogMessage( XIRRWrapper.XIRR(cashFlows, 6).ToString() )
I get the correct result. However I don't like this warning. How can I write the code better to eliminate this warning?
SUCCESS
Business Rule 'XIRRusage' was compiled successfully with warnings.
1) Warning at line 55: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
NOTE: The library being used is for the XIRR function. https://github.com/klearlending/XIRR#xirr
