SlideShare a Scribd company logo
1 of 2
V B . N ET Comme nts C #
' Single line only
REM Single line only
''' <summary>XML
comments</summary>
// Single line
/* Multiple
line */
/// <summary>XML comments on single
line</summary>
/** <summary>XML comments on multiple
lines</summary> */
V B . N ET Da ta Type s C #
Value Types
Boolean
Byte, SByte
Char
Short, UShort, Integer, UInteger,
Long, ULong
Single, Double
Decimal
Date (alias of System.DateTime)
structures
enumerations
Reference Types
Object
String
arrays
delegates
Initializing
Dim correct As Boolean = True
Dim b As Byte = &H2A 'hex or
&O52 for octal
Dim person As Object = Nothing
Dim name As String = "Dwight"
Dim grade As Char = "B"c
Dim today As Date = #12/31/2010
12:15:00 PM#
Dim amount As Decimal = 35.99@
Dim gpa As Single = 2.9!
Dim pi As Double = 3.14159265
Dim lTotal As Long = 123456L
Dim sTotal As Short = 123S
Dim usTotal As UShort = 123US
Dim uiTotal As UInteger = 123UI
Dim ulTotal As ULong = 123UL
Value Types
bool
byte, sbyte
char
short, ushort, int, uint, long, ulong
float, double
decimal
DateTime (not a built-in C# type)
structs
enumerations
Reference Types
object
string
arrays
delegates
Initializing
bool correct = true;
byte b = 0x2A; // hex
object person = null;
string name = "Dwight";
char grade = 'B';
DateTime today = DateTime.Parse("12/31/2010
12:15:00 PM");
decimal amount = 35.99m;
float gpa = 2.9f;
double pi = 3.14159265; // or 3.14159265D
long lTotal = 123456L;
short sTotal = 123;
ushort usTotal = 123;
uint uiTotal = 123; // or 123U
ulong ulTotal = 123; // or 123UL
V B . N ET Cons ta nts C #
Const MAX_STUDENTS As Integer =
25
' Can set to a const or var; may be
initialized in a constructor
ReadOnly MIN_DIAMETER As Single
= 4.93
const int MAX_STUDENTS = 25;
// Can set to a const or var; may be initialized in
a constructor
readonly float MIN_DIAMETER = 4.93f;
V B . N ET Ope r a tor s C #
Comparison
= < > <= >= <>
Arithmetic
+ - * /
Mod
 (integer division)
^ (raise to a power)
Assignment
= += -
= *= /= = ^= <<= >>= &=
Bitwise
And Or Xor Not << >>
Logical
AndAlso OrElse And Or Xor No
t
Note: AndAlso and OrElse perform
short-circuit logical evaluations
String Concatenation
&
Comparison
== < > <= >= !=
Arithmetic
+ - * /
% (mod)
/ (integer division if both operands are ints)
Math.Pow(x, y)
Assignment
= += -
= *= /= %= &= |= ^= <<= >>= ++ -
-
Bitwise
& | ^ ~ << >>
Logical
&& || & | ^ !
Note: && and || perform short-circuit logical
evaluations
String Concatenation
+

More Related Content

Viewers also liked

Tme godissermonslides
Tme godissermonslidesTme godissermonslides
Tme godissermonslidesDavid Sr.
 
Depok, i'm lost in love
Depok, i'm lost in loveDepok, i'm lost in love
Depok, i'm lost in loveIfa Gre'
 
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος της θάλασσας στην οποία π...
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος  της θάλασσας στην οποία π...ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος  της θάλασσας στην οποία π...
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος της θάλασσας στην οποία π...Μαυρουδης Μακης
 
Presentazione distrettisulweb
Presentazione distrettisulwebPresentazione distrettisulweb
Presentazione distrettisulwebGiacomo Trevisan
 
Your Emotional Intelligence
Your Emotional IntelligenceYour Emotional Intelligence
Your Emotional IntelligenceBeejal Parmar
 
Seeds of Joy Slides, 9/22/13
Seeds of Joy Slides, 9/22/13Seeds of Joy Slides, 9/22/13
Seeds of Joy Slides, 9/22/13CLADSM
 
วันแม่แห่งชาติ
วันแม่แห่งชาติวันแม่แห่งชาติ
วันแม่แห่งชาติFilm'mii On
 
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...Asamblea Nacional
 
Victory Cookbook - Free E-Book
Victory Cookbook - Free E-BookVictory Cookbook - Free E-Book
Victory Cookbook - Free E-BookChuck Thompson
 

Viewers also liked (14)

Panduan pkm-tahun-2013
Panduan pkm-tahun-2013Panduan pkm-tahun-2013
Panduan pkm-tahun-2013
 
Tme godissermonslides
Tme godissermonslidesTme godissermonslides
Tme godissermonslides
 
Depok, i'm lost in love
Depok, i'm lost in loveDepok, i'm lost in love
Depok, i'm lost in love
 
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος της θάλασσας στην οποία π...
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος  της θάλασσας στην οποία π...ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος  της θάλασσας στην οποία π...
ο καπετάνιος του πλοίου θέλει να γνωρίζει το βάθος της θάλασσας στην οποία π...
 
Img 0001
Img 0001Img 0001
Img 0001
 
Equality
EqualityEquality
Equality
 
Presentazione distrettisulweb
Presentazione distrettisulwebPresentazione distrettisulweb
Presentazione distrettisulweb
 
Your Emotional Intelligence
Your Emotional IntelligenceYour Emotional Intelligence
Your Emotional Intelligence
 
Valeria vallejo
Valeria vallejoValeria vallejo
Valeria vallejo
 
Sa 550$r
Sa 550$rSa 550$r
Sa 550$r
 
Seeds of Joy Slides, 9/22/13
Seeds of Joy Slides, 9/22/13Seeds of Joy Slides, 9/22/13
Seeds of Joy Slides, 9/22/13
 
วันแม่แห่งชาติ
วันแม่แห่งชาติวันแม่แห่งชาติ
วันแม่แห่งชาติ
 
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...
La Asamblea Nacional organiza una mesa de trabajo sobre sus atribuciones en m...
 
Victory Cookbook - Free E-Book
Victory Cookbook - Free E-BookVictory Cookbook - Free E-Book
Victory Cookbook - Free E-Book
 

Similar to Vb and c#

C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyGrejoJoby1
 
Cs211 module 1_2015
Cs211 module 1_2015Cs211 module 1_2015
Cs211 module 1_2015Saad Baig
 
Cs211 module 1_2015
Cs211 module 1_2015Cs211 module 1_2015
Cs211 module 1_2015Saad Baig
 
Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxSONU KUMAR
 
Testing lecture after lec 4
Testing lecture after lec 4Testing lecture after lec 4
Testing lecture after lec 4emailharmeet
 
Open Gurukul Language PL/SQL
Open Gurukul Language PL/SQLOpen Gurukul Language PL/SQL
Open Gurukul Language PL/SQLOpen Gurukul
 
Interactive Transmission System Computation Unit
Interactive Transmission System Computation UnitInteractive Transmission System Computation Unit
Interactive Transmission System Computation Unitmayankraj0805
 
Digital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural ModelingDigital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural ModelingIndira Priyadarshini
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarPRAVIN GHOLKAR
 
2.Types_Variables_Functions.pdf
2.Types_Variables_Functions.pdf2.Types_Variables_Functions.pdf
2.Types_Variables_Functions.pdfTrnThBnhDng
 
guia de referencia para a linguagem do fabricante CCS info_syntax.pdf
guia de referencia para a linguagem do fabricante CCS info_syntax.pdfguia de referencia para a linguagem do fabricante CCS info_syntax.pdf
guia de referencia para a linguagem do fabricante CCS info_syntax.pdfSilvanildoManoeldaSi
 
Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Geeks Anonymes
 
C language by Dr. Gholkar D. R.
C language by Dr. Gholkar D. R.C language by Dr. Gholkar D. R.
C language by Dr. Gholkar D. R.drgholkar
 

Similar to Vb and c# (20)

C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
Cs211 module 1_2015
Cs211 module 1_2015Cs211 module 1_2015
Cs211 module 1_2015
 
Cs211 module 1_2015
Cs211 module 1_2015Cs211 module 1_2015
Cs211 module 1_2015
 
verilog_tutorial1.pptx
verilog_tutorial1.pptxverilog_tutorial1.pptx
verilog_tutorial1.pptx
 
Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptx
 
Testing lecture after lec 4
Testing lecture after lec 4Testing lecture after lec 4
Testing lecture after lec 4
 
Open Gurukul Language PL/SQL
Open Gurukul Language PL/SQLOpen Gurukul Language PL/SQL
Open Gurukul Language PL/SQL
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
Interactive Transmission System Computation Unit
Interactive Transmission System Computation UnitInteractive Transmission System Computation Unit
Interactive Transmission System Computation Unit
 
C# basics
C# basicsC# basics
C# basics
 
Digital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural ModelingDigital System Design-Switchlevel and Behavioural Modeling
Digital System Design-Switchlevel and Behavioural Modeling
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. Gholkar
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
C++ in 10 Hours.pdf.pdf
C++ in 10 Hours.pdf.pdfC++ in 10 Hours.pdf.pdf
C++ in 10 Hours.pdf.pdf
 
2.Types_Variables_Functions.pdf
2.Types_Variables_Functions.pdf2.Types_Variables_Functions.pdf
2.Types_Variables_Functions.pdf
 
C SLIDES PREPARED BY M V B REDDY
C SLIDES PREPARED BY  M V B REDDYC SLIDES PREPARED BY  M V B REDDY
C SLIDES PREPARED BY M V B REDDY
 
guia de referencia para a linguagem do fabricante CCS info_syntax.pdf
guia de referencia para a linguagem do fabricante CCS info_syntax.pdfguia de referencia para a linguagem do fabricante CCS info_syntax.pdf
guia de referencia para a linguagem do fabricante CCS info_syntax.pdf
 
Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)
 
C language by Dr. Gholkar D. R.
C language by Dr. Gholkar D. R.C language by Dr. Gholkar D. R.
C language by Dr. Gholkar D. R.
 

More from nivlayalat

Difference between microsoft excel 2007
Difference between microsoft excel 2007Difference between microsoft excel 2007
Difference between microsoft excel 2007nivlayalat
 
Machine problems
Machine problemsMachine problems
Machine problemsnivlayalat
 
Figures of networks
Figures of networksFigures of networks
Figures of networksnivlayalat
 
Nup vacant positions
Nup vacant positionsNup vacant positions
Nup vacant positionsnivlayalat
 

More from nivlayalat (6)

Difference between microsoft excel 2007
Difference between microsoft excel 2007Difference between microsoft excel 2007
Difference between microsoft excel 2007
 
Machine problems
Machine problemsMachine problems
Machine problems
 
Figures of networks
Figures of networksFigures of networks
Figures of networks
 
Nup vacant positions
Nup vacant positionsNup vacant positions
Nup vacant positions
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Vb and c#
Vb and c#Vb and c#
Vb and c#
 

Recently uploaded

GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024SimonedeGijt
 
[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)Dimitrios Platis
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
Rapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and InsightsRapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and Insightsrapidoform
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphNeo4j
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Clinic
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 

Recently uploaded (20)

Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
Abortion Pill Prices Jozini ](+27832195400*)[ 🏥 Women's Abortion Clinic in Jo...
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Rapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and InsightsRapidoform for Modern Form Building and Insights
Rapidoform for Modern Form Building and Insights
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 

Vb and c#

  • 1. V B . N ET Comme nts C # ' Single line only REM Single line only ''' <summary>XML comments</summary> // Single line /* Multiple line */ /// <summary>XML comments on single line</summary> /** <summary>XML comments on multiple lines</summary> */ V B . N ET Da ta Type s C # Value Types Boolean Byte, SByte Char Short, UShort, Integer, UInteger, Long, ULong Single, Double Decimal Date (alias of System.DateTime) structures enumerations Reference Types Object String arrays delegates Initializing Dim correct As Boolean = True Dim b As Byte = &H2A 'hex or &O52 for octal Dim person As Object = Nothing Dim name As String = "Dwight" Dim grade As Char = "B"c Dim today As Date = #12/31/2010 12:15:00 PM# Dim amount As Decimal = 35.99@ Dim gpa As Single = 2.9! Dim pi As Double = 3.14159265 Dim lTotal As Long = 123456L Dim sTotal As Short = 123S Dim usTotal As UShort = 123US Dim uiTotal As UInteger = 123UI Dim ulTotal As ULong = 123UL Value Types bool byte, sbyte char short, ushort, int, uint, long, ulong float, double decimal DateTime (not a built-in C# type) structs enumerations Reference Types object string arrays delegates Initializing bool correct = true; byte b = 0x2A; // hex object person = null; string name = "Dwight"; char grade = 'B'; DateTime today = DateTime.Parse("12/31/2010 12:15:00 PM"); decimal amount = 35.99m; float gpa = 2.9f; double pi = 3.14159265; // or 3.14159265D long lTotal = 123456L; short sTotal = 123; ushort usTotal = 123; uint uiTotal = 123; // or 123U ulong ulTotal = 123; // or 123UL
  • 2. V B . N ET Cons ta nts C # Const MAX_STUDENTS As Integer = 25 ' Can set to a const or var; may be initialized in a constructor ReadOnly MIN_DIAMETER As Single = 4.93 const int MAX_STUDENTS = 25; // Can set to a const or var; may be initialized in a constructor readonly float MIN_DIAMETER = 4.93f; V B . N ET Ope r a tor s C # Comparison = < > <= >= <> Arithmetic + - * / Mod (integer division) ^ (raise to a power) Assignment = += - = *= /= = ^= <<= >>= &= Bitwise And Or Xor Not << >> Logical AndAlso OrElse And Or Xor No t Note: AndAlso and OrElse perform short-circuit logical evaluations String Concatenation & Comparison == < > <= >= != Arithmetic + - * / % (mod) / (integer division if both operands are ints) Math.Pow(x, y) Assignment = += - = *= /= %= &= |= ^= <<= >>= ++ - - Bitwise & | ^ ~ << >> Logical && || & | ^ ! Note: && and || perform short-circuit logical evaluations String Concatenation +