Wednesday 26 July 2017

Lecture#4 ka Point#84 (Csharp Roman Hindi/Urdu Me).

VB.NET 'loosly coupled language' hai aur C# 'tightly coupled language' hai. C# me no return type function me hum void ka keyword use krte hain jab k VB.NET me no return type function k saath hum sub ka keyword use krte hain. Agar hum C# me function ki return type likhtey hain lakin is function me return ki statement ya return keyword nahi likhtey to code compile nahi hota, is ka matlab yeh hua k jab humney function k saath is ki return type mention krdi to return ki statement ya keyword mendatory ho jaye ga jab k VB.NET me function ki return type mention krte hain lakin is function me return ki statement ya keyword nahi likhtey to code compile ho jaye ga aur is function ka output woh hoga jo is function ki return data type ki default value hogi, is ka matlab yeh hua k VB.NET 'loosly coupled language' hai. VB.NET me return type function k saath hum 'Function' ka keyword use kren ge jab k no return type function k saath hum 'Sub' ka keyword use kren ge, Sub ka matlab sub-routine hai aur sub-routine se muraad aesi functionality jo kuch return na kr rhi ho. Agar hum VB.NET me Function ka keyword use krtey huvey aik function bnatey hain lakin is function ki return data type mention nahi krte aur na hi is function me return ka keyword likhtey hain tab bhi humara code run ho jata hai. Agar hum VB.NET me function ka keyword use krtey huvey function bnatey hain aur return data type mention nahi krte to VB.NET ka compiler is function ko khud se default return data type assign kr de ga jo k 'Object' hogi. VB.NET me 'Object' aik aesi data type hai jo k 'apply for all' hai, aur 'apply for all' ka matlab hai k is me tamam data types mojood hongi jesey k string, long, integer, short, byte etc. VB6 me default return data type 'Variant' hai jo k 'apply for all' hai. C# me margin boht kam hota hai jab k VB.NET me margin boht zyada hota hai, is ka matlab yeh hua k VB.NET me jesey hum return type function me return data type aur return ka keyword mention nahi kr rhey hotey to VB.NET ka compiler us ki jagah function ki by-default data type aur by-default value return krwa rha hota hai, jis ki wajah se VB.NET me humey humara desired output nahi milta.

No comments:

Post a Comment