Thank You! now i understand, i have been looking for the why for a long time and all ppl would tell me is to initialize variables and leave it at that i get it now ^_^!
Nice way of teaching. But what you have said here that we can't initialize new values with implicit constructor is giving me some doubts. Here is my solution to this: Public Class Test { Public int x; } Class program { Static void Main(strung[ ] args) { Test T1 = new Test{ x=100}; Test T2 = new Test {x=200}; Console.WriteLine("X = "+T1.x); Console.WriteLine("X = ",+T2.x); Console.ReadLine( ); } } By using above logic, we can initialize as many new values as we want by creating multiple instances of the class Test.
1. Using this method you are not initializing values of "x", rather you are assigning new values to "x". The above is the same as--> Test T1 = new Test(); Test T2 = new Test (); T1.x = 100; T2.x = 200; 2. The only reason you're able to assign values to "x" using the above method is that "x" is declared as a "public" field inside Class "Test", if "x" was declared as a "private" or "protected" field you wouldn't have been able to do this.
Sir, they can be also changed using f1.x = 100, f2.x = 200, f3.x = 300 after instantiating. So, I think that we need constructors to instantiate variables with different values is incorrect, i think.
The only reason you're able to assign values to "x" using the above method is that "x" is declared as a "public" field inside Class "Test", if "x" was declared as a "private" or "protected" field you wouldn't have been able to do this.
hi Mr.bangar raju you are not bangar raju i mean to say you are Mr.speed raju as your teaching speed is like bullet train.so try to take the subject slowly and very important clearly
Sir, you have made me fallen in love with Dot net. Thank you so much for the videos. God bless you sir. #respect
Best C# Tutorial ever. Thanks a lot Mr. Bangar.
His voice is so clear even at 2X you can understand
Naresh Technology is a great class for C#
Awesome Explanation
we should not learn just for interviews..clearning concepts is more important..
Woww so much u cleared our concepts thank u so much Sir,please keep posting more vlogs like this
great teaching ..loved it to the core
Superb explanation ...
Absolutely!
Useful upto 8:00 minutes only, no need to watch full video
Thank You! now i understand, i have been looking for the why for a long time and all ppl would tell me is to initialize variables and leave it at that i get it now ^_^!
these tutorials are *bangar* xD
Much needed for my classes.
Nice way of teaching. But what you have said here that we can't initialize new values with implicit constructor is giving me some doubts. Here is my solution to this:
Public Class Test
{
Public int x;
}
Class program
{
Static void Main(strung[ ] args)
{
Test T1 = new Test{ x=100};
Test T2 = new Test {x=200};
Console.WriteLine("X = "+T1.x);
Console.WriteLine("X = ",+T2.x);
Console.ReadLine( );
}
}
By using above logic, we can initialize as many new values as we want by creating multiple instances of the class Test.
1. Using this method you are not initializing values of "x", rather you are assigning new values to "x".
The above is the same as-->
Test T1 = new Test();
Test T2 = new Test ();
T1.x = 100;
T2.x = 200;
2. The only reason you're able to assign values to "x" using the above method is that "x" is declared as a "public" field inside Class "Test", if "x" was declared as a "private" or "protected" field you wouldn't have been able to do this.
top notch video
my sir listen to your classes and he will teach to us
Great 👍👍👍👍👍🎉
Nicely explained
super guru ji
Sir, they can be also changed using f1.x = 100, f2.x = 200, f3.x = 300 after instantiating. So, I think that we need constructors to instantiate variables with different values is incorrect, i think.
The only reason you're able to assign values to "x" using the above method is that "x" is declared as a "public" field inside Class "Test", if "x" was declared as a "private" or "protected" field you wouldn't have been able to do this.
Great 👍👍👍
Actually this video should be Part-2 and the types of Constructors should be Part - 3.
THANK YOU SIR .
sir we can also change the value of X for every instances by assigning like F2.X =200
You won't be able to do that if "X" is defined as "private" or "protected".
Thansk a lot.
Hey can anyone please try to make a videos on Xamarin for iOS with C#
Can create a static constructor inside non static class?
Which constructor is called first default or static?
ur videos are awesome....but plz tell me....can we use select statement in implicit cursor...I m a beginner
Difference between object and instance?? Can anyone tell what is difference . It was asked in interview.
Instance means copy at a certain level …object is the thing built from a blueprint ( from class )
New video for asp dot net
hi Mr.bangar raju you are not bangar raju i mean to say you are Mr.speed raju as your teaching speed is like bullet train.so try to take the subject slowly and very important clearly
@siddhu salvi ha ha
he is taking class slowly only
Listen at 0.5 speed