Forum Discussion
Dmitry_Nikolaev
15 years agoStaff
Hello Kay,
You can use the script below to get all resources in the specified assembly. Before you run the script, you need to specify the full path to the needed assembly in the 'assemblyPath' variable.
To compare two strings, you can use the aqString.Compare method. Please read the "aqString.Compare" article fore more information.
You can use the script below to get all resources in the specified assembly. Before you run the script, you need to specify the full path to the needed assembly in the 'assemblyPath' variable.
Sub Test
Dim i, assemblyPath, assembly, names, stream, resourceReader, enumerator
assemblyPath = "C#_ASSEMBLY_PATH"
Set assembly = dotNET.System_Reflection.Assembly.LoadFile(assemblyPath)
Set names = assembly.GetManifestResourceNames()
For i = 0 To names.Length - 1
Log.AppendFolder("Resource: " + names.GetValue(i))
Set stream = assembly.GetManifestResourceStream(names.GetValue(i))
Set resourceReader = dotNET.System_Resources.ResourceReader.zctor_2(stream)
Set enumerator = resourceReader.GetEnumerator
While enumerator.MoveNext()
Log.Message("Key: " & enumerator.Key & vbCrLf & "Value: " & enumerator.Value)
Wend
Log.PopLogFolder
Next
End Sub
To compare two strings, you can use the aqString.Compare method. Please read the "aqString.Compare" article fore more information.
Related Content
- 4 years agoSanjanaZagade
- 9 months agoLuukdb
- 12 months agoclaudio
Recent Discussions
- 6 hours agoSvetaG