|
-
Sep 21st, 2010, 03:59 AM
#1
[RESOLVED] Some small doubts while reading other posts
Last edited by akhileshbc; Sep 21st, 2010 at 06:11 AM.
Reason: wrong section
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 21st, 2010, 05:00 AM
#2
Re: Some small doubts while reading other posts
Moved. (Please specify your .Net version)
-
Sep 21st, 2010, 05:11 AM
#3
Frenzied Member
Re: Some small doubts while reading other posts
1. they are used to tell the compiler that these are not the predefined words but user defined variables
2. to conver the string into character
-
Sep 21st, 2010, 05:14 AM
#4
Re: Some small doubts while reading other posts
-
Sep 21st, 2010, 06:16 AM
#5
Re: Some small doubts while reading other posts
 Originally Posted by MartinLiss
Moved. (Please specify your .Net version)
Thanks for moving this thread...
Yeah. I have edited the post added the version too.
 Originally Posted by aashish_9601
1. they are used to tell the compiler that these are not the predefined words but user defined variables
2. to conver the string into character
Thanks...
But is Next a predefined word ? 
 Originally Posted by amrita
Thanks...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 21st, 2010, 06:20 AM
#6
Frenzied Member
Re: Some small doubts while reading other posts
 Originally Posted by akhileshbc
But is Next a predefined word ? 
you asking this question with a 200+ repute, strange
http://msdn.microsoft.com/en-us/libr...9t(VS.71).aspx
http://msdn.microsoft.com/en-us/libr...(v=VS.71).aspx
-
Sep 21st, 2010, 06:22 AM
#7
Fanatic Member
Re: Some small doubts while reading other posts
 Originally Posted by akhileshbc
Thanks... 
But is Next a predefined word ? 
Yes, Next is predefined, a for-Next loop would be very sorry without it
Code:
For <some statement>
'//method body
Next
-
Sep 21st, 2010, 06:25 AM
#8
Re: Some small doubts while reading other posts
 Originally Posted by aashish_9601
 Originally Posted by J-Deezy
Yes, Next is predefined, a for-Next loop would be very sorry without it
Code:
For <some statement>
'//method body
Next
Ah! Didn't thought about that one 
I was trying to migrate from VB6 to .Net. So, before that I flushed my memory. 
Sorry for my stupid question.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 21st, 2010, 06:31 AM
#9
Re: [RESOLVED] Some small doubts while reading other posts
As said, square brackets allow you to use a name (for methods, variables, properties, etc) that is usually reserved for keywords. Other examples are Public, Private, Class, Sub, etc.
As for your second point, the c indicates that it is a character literal and not a string literal of length 1. Even though a character and a 1-letter string are in all usual senses the same, in .NET they are simply two different classes. I would like to correct aashish_9601's answer though: there is no conversion taking place.
Code:
Dim a = "x"
Dim b = "x"c
In this code, a is a String and b is a Char.
The C# equivalent would be
Code:
var a = "x";
var b = 'x';
Since ' is reserved for comments in VB they had to find a different way to distinguish string and char literals, and they chose for a 'c' suffix.
-
Sep 21st, 2010, 06:34 AM
#10
Re: [RESOLVED] Some small doubts while reading other posts
Thanks Nick
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|