Top "Typeof" questions

Typeof (alternately typeof or TypeOf) is an operator provided by several programming languages which determines the data type of a given variable.

C# switch on type

Possible Duplicate: C# - Is there a better alternative than this to 'switch on type'? C# doesn't support switching on …

c# switch-statement typeof
Figuring out whether a number is a Double in Java

I'm a Java newbie. I'm trying to figure out whether a number is a Double with something like this: if ( …

java typeof
Get type name without full namespace

I have the following code: return "[Inserted new " + typeof(T).ToString() + "]"; But typeof(T).ToString() returns the full name including …

c# namespaces typeof
What is the difference between typeof and instanceof and when should one be used vs. the other?

In my particular case: callback instanceof Function or typeof callback == "function" does it even matter, what's the difference? Additional Resource: …

javascript instanceof typeof
When and where to use GetType() or typeof()?

Why this works if (mycontrol.GetType() == typeof(TextBox)) {} and this do not? Type tp = typeof(mycontrol); But this works Type …

c# .net types typeof gettype
How to efficiently check if variable is Array or Object (in NodeJS & V8)?

Is there any way to efficiently check if the variable is Object or Array, in NodeJS & V8? I'm writing …

javascript node.js v8 instanceof typeof
typeof operator in C

Is typeof in C, really an operator? I'm thinking because there is no polymorphism in C, that there is nothing …

c gcc typeof
Why does typeof array with objects return "object" and not "array"?

Possible Duplicate: JavaScript: Check if object is array? Why is an array of objects considered an object, and not an …

javascript jquery arrays object typeof
Testing if value is a function

I need to test whether the value of a form's onsubmit is a function. The format is typically onsubmit="return …

javascript typeof onsubmit
JavaScript: detect if argument is array instead of object (Node.JS)

How should I detect if the argument is an array because typeof [] returns 'object' and I want to distinguish between …

javascript arrays object node.js typeof