How to assign Func variable type to a variable?

Hi all,

In C# I can assign a Func/Action variable type to a variable via code like the below:

Action<string, string> logError = (valueStr, typeStr) => {
	if (String.IsNullOrWhiteSpace(valueStr)) {
        valueStr = "null";
    }
    Console.WriteLine("Warning - Failed to convert '{0}' to '{1}' value type.", valueStr, typeStr);
};

I can achieve the same result using an Invoke Code Block (C#) inside of UiPath. However, the issue is that the process becomes very slow to initialise.

Can I just create the Func/Action variable in a normal assign activity somehow (in VB and not C#)? I have tried but without success. If anyone is able to point me in the right direction (with the above example as a guide) it would be much appreciated! :smiley: