Questions tagged [jscript.net]

JScript.NET is a .NET programming language developed by Microsoft.

JScript.NET is a .NET programming language developed by Microsoft as a natural successor to Microsoft's Active Scripting language JScript, which, in turn, started life as an implementation of JavaScript.

More info: Wikipedia article

98 questions
2
votes
2 answers

How can I list all method of a class/object?

How can I list all available method of a class or object in jscript.net? Is it even possible?
Codler
  • 10,951
  • 6
  • 52
  • 65
2
votes
1 answer

How do I return a JSON string from an Eval call to JScript.NET?

I am trying to use JScript.NET to do dynamic code evaluation. I have a simple JScript.NET eval method that handles that: public static object Eval(string javascript) { return Microsoft.JScript.Eval.JScriptEvaluate(javascript,…
mattmc3
  • 17,595
  • 7
  • 83
  • 103
1
vote
2 answers

C# & VSAEngine - Calculating a string expression with a exponent?

i've a prob here, so i need a help:) When i'm calculating expression like this "(10.5 + 3.5 / 2) * 2" with jscript vsa engine, it's ok, but now i 've a question... if in the string like above, i want to calculate also an exponent (10.5 + 3.5 / 2) *…
Slaine
  • 41
  • 1
  • 9
1
vote
4 answers

Autoproxy configuration script parsing in .Net/C#

In order for my application (.Net 1.1) to use the system configured proxy server (trough a proxy.pac script) I was using an interop calls to WinHTTP function WinHttpGetProxyForUrl, passing the proxy.pac url I got from the registry. Unfortunately, I…
Sunny Milenov
  • 21,990
  • 6
  • 80
  • 106
1
vote
1 answer

How I can use Add-Type in powershell through command line in order to execute VB.NET or C# (or JScript.net) code?

Here's the MS documentation concerning Add-Type So I'm trying to add type through command line: >powershell Add-Type -TypeDefinition "public class T{public static int Add(int a, int b){return (a + b);}}" -Language CSharp or >powershell Add-Type…
npocmaka
  • 55,367
  • 18
  • 148
  • 187
1
vote
1 answer

Forcing specific .NET types in JScript.NET?

I am using the Fiddler web debugger which uses FiddlerScript which is based on JScript.NET. I'm trying to do some simple .NET string parsing but it fails with error "More than one method or property matches this argument list". For example: …
Jay
  • 319
  • 3
  • 12
1
vote
0 answers

Match string against list of RegEx rules using switch...case statement

I've a code snippet written in JScript.Net for FiddlerScript and trying to re-write the same in C# to use as Fiddler extension. I'm not familiar with C# syntax, so need help. Here's the existing code snippet in JScript.NET, which I'm trying to…
Rohit
  • 99
  • 8
1
vote
2 answers

Dictionary object syntax?

I'm having trouble figuring out the syntax for a JScript .NET dictionary object. I have tried private var myDictionary: Dictionary; but the compiler complains that it's missing a semicolon and that the Dictionary object is not…
posfan12
  • 2,541
  • 8
  • 35
  • 57
1
vote
1 answer

Fiddlers Jscript JSON.JsonDecode

This is what I have: public static var users=Fiddler.WebFormats.JSON.JsonDecode('[{key:"20048039", value:"Some Name"}, {key:"204130"...); This is what I want: users.JSONObject[0].key or users.JSONObject[0].value This what I use for…
1
vote
0 answers

Is there a way to declare a class inside a try and catch block in jscript?

I want to use System.Threading methods provided by the .NET. for creating 2 test conditions that must happen simultaneously. Using this solution to put the function in a class I was able to create 2 threads and run them parallely in jsc…
Pramod
  • 25
  • 7
1
vote
2 answers

Batch + JScript to .exe

I have a batch-file which includes some JScript, but I want to convert it to a .exe so the script can't be seen by others (encrypted) How can I do this? I tried with Bat to Exe, but doesn't work since I have JScript. The code is basically launching…
Hubgum
  • 23
  • 1
  • 5
1
vote
2 answers

How to include dynamic math evaluators in UWP project?

I have been using JScript.NET to calculate expressions (and execute input code) in Windows Forms. Like this: (55 % 6) + Math.acos(0.4) - ~ 9 * Math.PI + Math.random() = 33.72725296117653 Now I would want to have the same thing on Xamarin Forms, but…
Happypig375
  • 1,022
  • 1
  • 12
  • 32
1
vote
0 answers

How to obtain a System.Type object in JScript.NET?

There is an old .ASPX page using "javascript" (JScript) as the page language. And there is a C# method in a referenced assembly that should be invoked. public void IX Locate(Type x) Using C# this method can be invoked by supplying the corresponding…
user2864740
  • 60,010
  • 15
  • 145
  • 220
1
vote
1 answer

Load application icon through resource

Here's what I've done: I created a resource.resx file using my IDE (SharpDevelop) and added an logo.ico to it. The resource.resx file looks something like this:
Luca Matteis
  • 29,161
  • 19
  • 114
  • 169
1
vote
1 answer

Elmah throws exception when accessing Context.Request.ServerVariables

I'm using Elmah to log exceptions for my website, everything seems to be all working fine until one day I noticed that the 500 server errors are not being caught properly. I'm using following script to specifically ignore errors from…
BlueFox
  • 950
  • 13
  • 29