was talking with few test professionals for C# automation. Team is reluctant to change from Java background to C# technologies. I have used many scripting and programming languages. There is not much variation between Java & C# at core langulage level.
Differences and similarities
Selenium script on Java & C#
Developed a sample selenium scripting using Java and ported to C#.
Reference Links
Moving to C# for Java Developers
Java Vs C#
Differences and similarities
Description | Java | C# |
---|---|---|
Program Entry Point | main(String ...args) | Main() or Main(string [] args) |
Smallest Deployment Unit | Jar | EXE/DLL, Private Assembly, Shared Assembly |
Signing | Jar Signing | Assembly Signing |
Namespace | package | namespace |
Including Classes | import | using |
Inheritance | class (extends), interface (implements) | class and interface (:) |
Visibility | private, package,protected, public | private, protected, internal,internal protected, public |
Abstract Class | abstract class X { ... } | abstract class X { ... } |
Non-Extensible Class | final class X { ... } | sealed class X { ... } |
Non-Writable Field | final | readonly |
Non-Extensible Method | final | sealed |
Constant | static final | const |
Checking Instance Type | instanceof | is |
Enums | enum, can have fields, methods and implement interfaces and are typesafe | enum, cannot have methods,fields or implement interfaces, not typesafe |
for-each construct | for (item : collection) { ... } | foreach(item in collection) { ... } |
Switch-Case | numeric types (int,float...) enums, and now strings (in Java 7) | numeric types, enums and strings |
Method Parameters | Object References are passed by Value only | Object reference are passedby Value(default), ref & out |
Variable Arguments | method(type... args) | Method(params type[] args) |
Catching Exceptions | try { ... } catch (Exception ex) {...} | try { ... } catch (Exception ex) {...} |
Meta Type | Class klass = X.class; | Type type = typeof(X); |
Meta Information | @Annotation | [Attribute] |
Static class | Simulated by private Ctor and static methods | Static class and ctor with static methods |
Properties | getProperty(),setProperty() | Property { get; set; } compiler generated get_Property() and set_Property() methods |
Selenium script on Java & C#
Developed a sample selenium scripting using Java and ported to C#.
Reference Links
Moving to C# for Java Developers
Java Vs C#
13 comments:
Superb explanation & it's too clear to understand the concept as well, keep sharing admin with some updated information with right examples.Keep update more posts.
Software testing Training in Chennai
Coded ui Training in Chennai by Vishwa
Hi, Reach Mr.Vishwa for Best Selenium and Coded UI Training in Chennai with real time project assistance. This people will teach everything from the basics up to advanced level scenarios from frameworks.
I learned from Mr.Vishwa and Raj they are very good automation people for Selenium Frameworks. After joined with them I learned many things and now I am writing automation scripts in own project. Vishwa 9003085882
Coded UI training in chennai
Java is partially compiled and partially interpreted language. That gives us the opportunity to write a program - like one above - only once, and compile it for JVM. The environment where you want to run it should now have a JRE of it’s own, to which your program will talk.
java training in chennai
There are many flavours of programming all requiring slightly different variations in capability. Being able to think in the abstract and visualize the whole as one builds the necessary assembly of code, whether objects or created entities is a key requirement, programming skills is actually in the legacy systems which will hang around for another 50 years and that requires real skill and ability.
Secure software development
This blog is very well good so please say about those things it is very well useful too, so please say about many interesting facts.
Web Design Company in Chennai
This blog explains the details about changing the ways of doing that business. That is understand well and doing some different process. Provides he best output of others. Thanks for this blog.
Digital Marketing Company in Chennai
SEO Company in Chennai
This blog is very well interesting, very well impressive and very well done so please increased the passion it will be helpful for me.
Digital Marketing Company in Chennai
Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
SEO Company in India
Digital Marketing Company in India
Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
Selenium Training in Chennai
thanks for giving absolute way to achieve career goals. nice and well guidance to me. keep share more things.
New Zealand education Consultants in Chennai
The way you have stated everything above is quite awesome. Keep blogging like this. Thanks a lot
Digital Marketing Company in Chennai
I am really searching for this kind of information, as well as i came to know many things. so please update the latest information, it may be useful for me.
Digital Marketing Company in Chennai
Thank you for sharing such a nice and interesting blog with us. I have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle.
Best Dental Clinic In Vellore
Post a Comment