00tree00
00tree00
CC#
Created by 00tree00 on 2/18/2023 in #help
Delete only specific files
it works! thanks a lot
5 replies
CC#
Created by 00tree00 on 2/18/2023 in #help
Delete only specific files
Will this delete all the files in the folder or just the ones in the if?
5 replies
CC#
Created by 00tree00 on 2/8/2023 in #help
Unable to cast object of type - tried to explicit conversion operator
5 replies
CC#
Created by 00tree00 on 2/8/2023 in #help
Unable to cast object of type - tried to explicit conversion operator
Here is url to function InstallGameFiles https://hastebin.com/share/ihopiguwut.java wherever DownloadChangesCompletedCallback is used there UserState is passed
5 replies
CC#
Created by 00tree00 on 2/8/2023 in #help
Unable to cast object of type - tried to explicit conversion operator
in Version structure i will added
public static explicit operator Version(Changes changes)
{
return new Version
{

major = short.Parse(changes.major)
};
}
public static explicit operator Version(Changes changes)
{
return new Version
{

major = short.Parse(changes.major)
};
}
and in Changes structure
public static explicit operator Changes(Version content)
{
return new Changes
{
major = $"{content.major2}.{content.minor2}.{content.subMinor2}".ToString()
};
}
public static explicit operator Changes(Version content)
{
return new Changes
{
major = $"{content.major2}.{content.minor2}.{content.subMinor2}".ToString()
};
}
but still doesn't work
5 replies
CC#
Created by 00tree00 on 2/8/2023 in #help
Unable to cast object of type - tried to explicit conversion operator
struct Version
{
internal static Version zero = new Version(0, 0, 0);

private short major;
private short minor;
private short subMinor;

internal Version(short _major, short _minor, short _subMinor)
{
major = _major;
minor = _minor;
subMinor = _subMinor;
}
internal Version(string _version)
{
string[] versionStrings = _version.Split('.');
if (versionStrings.Length != 3)
{
major = 0;
minor = 0;
subMinor = 0;
return;
}

major = short.Parse(versionStrings[0]);
minor = short.Parse(versionStrings[1]);
subMinor = short.Parse(versionStrings[2]);
}

internal bool IsDifferentThan(Version _otherVersion)
{
if (major != _otherVersion.major)
{
return true;
}
else
{
if (minor != _otherVersion.minor)
{
return true;
}
else
{
if (subMinor != _otherVersion.subMinor)
{
return true;
}
}
}
return false;
}

public override string ToString()
{
return $"{major}.{minor}.{subMinor}";
}
}
struct Version
{
internal static Version zero = new Version(0, 0, 0);

private short major;
private short minor;
private short subMinor;

internal Version(short _major, short _minor, short _subMinor)
{
major = _major;
minor = _minor;
subMinor = _subMinor;
}
internal Version(string _version)
{
string[] versionStrings = _version.Split('.');
if (versionStrings.Length != 3)
{
major = 0;
minor = 0;
subMinor = 0;
return;
}

major = short.Parse(versionStrings[0]);
minor = short.Parse(versionStrings[1]);
subMinor = short.Parse(versionStrings[2]);
}

internal bool IsDifferentThan(Version _otherVersion)
{
if (major != _otherVersion.major)
{
return true;
}
else
{
if (minor != _otherVersion.minor)
{
return true;
}
else
{
if (subMinor != _otherVersion.subMinor)
{
return true;
}
}
}
return false;
}

public override string ToString()
{
return $"{major}.{minor}.{subMinor}";
}
}
struct Changes
{

internal static Changes zero2 = new Changes("");


private string major;


internal Changes(string _major)
{
major = _major;

}

internal bool IsDifferentThan(Changes _changesVersion)
{
if (major != _changesVersion.major)
{
return true;
}

return false;
}
public override string ToString()
{
return $"{major}";
}
}
struct Changes
{

internal static Changes zero2 = new Changes("");


private string major;


internal Changes(string _major)
{
major = _major;

}

internal bool IsDifferentThan(Changes _changesVersion)
{
if (major != _changesVersion.major)
{
return true;
}

return false;
}
public override string ToString()
{
return $"{major}";
}
}
5 replies