Notifications
Clear all

[Closed] DotNet string.StartsWith bool cultureInfo

Hi

I have been trying to use more .Net stuff in Maxscript and have come up against an issue i cant seem understand.
This particular issue is string.startswith its easy enough to write one in MXS to loop over each char but I want ti get better at .Net, and hey its already been written for me

stringObject = dotNetObject "System.string" "C:\SomeFolder\SomeSubFolder\SomeFile.txt"
mybool = dotNetClass "System.Boolean" -- should not be needed as it stated that primatives get converted autmatically between MXS and .NET but does not seem to work for me
CultureInfo = dotNetClass "System.Globalization.CultureInfo"
--CultureInfo = (dotNetClass "System.Globalization.CultureInfo" "C:\SomeFolder\SomeSubFolder\SomeFile.txt") -- DOES NOT WORK not even sure why i need this

stringObject.StartsWith "C:\SomeFolder\SomeSubFolder" myBool.FalseString CultureInfo

TLDR
How to use the .NET function
string.StartsWith string bool cultureInfo
from .NET in Maxscript

Any help appreciated
Cheers
Dave