Difference between C# var and Javascript var
C#
var i = 10; // implicitly typed
int i = 10; //explicitly typed
//Initialization is mandatory
var a = 10;
//Allowed
a = 13;
//Not Allowed
a = "string";
By using above example we can say C# var is strongly typed, but inferred from whatever the value is being assigned.
Javascript
<script type="text/javascript">
var a = "stringValue";
a = 567;
a= "2ndString"; // allowed
</script>
Solution for the QlikView, Biztalk, DotNet and MSBI real time development problems
Search This Blog
Wednesday, November 9, 2011
Subscribe to:
Post Comments (Atom)
Popular Posts
-
as is Is Operator is used to check the Compatibility of an Object with a given Type and it returns the result as a Boolean (True or ...
-
What is UFrame? UFrame is like an IFRAME that can load and host a page (ASP.NET, PHP or regular html) inside a DIV. However, unlike IFRAME w...
-
Migration from Visual Studio 2008 to 2013 Without any code changes I successfully migrated from VS 2008 to 2013 but when running website f...
-
Applies To ASP.NET version 1.1 ASP.NET version 2.0 Summary This How To shows how you can help protect your ASP.NET applications from cr...
-
Use below code to raise messages from javascript and code behind. .ASPX <%@ Page Language="C#" AutoEventWireup="true...
No comments:
Post a Comment