n!T!n Learns 2 Kode...!!

Nitin Dhiman. Powered by Blogger.

Recent Posts

alt key codes

No comments

Symbol Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
§ 21
22
23
24
25
26
27
28
29
30
31
space 32
! 33
" 34
# 35
$ 36
% 37
& 38
' 39
( 40
) 41
* 42
+ 43
, 44
- 45
. 46
/ 47
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57
: 58
; 59
< 60
= 61
> 62
? 63
@ 64
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
J 74
K 75
L 76
M 77
N 78
O 79
P 80
Q 81
R 82
S 83
T 84
U 85
V 86
W 87
X 88
Y 89
Z 90
[ 91
\ 92
] 93
^ 94
_ 95
` 96
a 97
b 98
c 99
d 100
e 101
f 102
g 103
h 104
i 105
j 106
k 107
l 108
m 109
n 110
o 111
p 112
q 113
r 114
s 115
t 116
u 117
v 118
w 119
x 120
y 121
z 122
{ 123
| 124
} 125
~ 126
127
Ç 128
ü 129
é 130
â 131
ä 132
à 133
å 134
ç 135
ê 136
ë 137
è 138
ï 139
î 140
ì 141
Ä 142
Å 143
É 144
æ 145
Æ 146
ô 147
ö 148
ò 149
û 150
ù 151
ÿ 152
Ö 153
Ü 154
¢ 155
£ 156
¥ 157
158
ƒ 159
á 160
í 161
ó 162
ú 163
ñ 164
Ñ 165
ª 166
º 167
¿ 168
169
¬ 170
½ 171
¼ 172
¡ 173
« 174
» 175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
α 224
ß 225
Γ 226
π 227
Σ 228
σ 229
µ 230
τ 231
Φ 232
Θ 233
Ω 234
δ 235
236
φ 237
ε 238
239
240
± 241
242
243
244
245
÷ 246
247
° 248
249
· 250
251
252
² 253
254
255

Dummy Credit Card Numbers for Testing

No comments
Here is a list of dummy credit card number that can be used while testing your applications involving credit card transactions:
Visa: 4111-1111-1111-1111
MasterCard: 5431-1111-1111-1111
Amex: 341-1111-1111-1111
Discover: 6011-6011-6011-6611

No comments

Custom Numeric Format Strings Output Examples
The following table illustrates the output created by applying some custom numeric format
strings to specific data types and values. The output was generated using the ToString method
and the English-United States (en-US) culture.

Format string

Data type
Value

Output
#####Double123123
00000Double12300123
(###) ### - ####Double1234567890(123) 456 – 7890
#.##Double1.21.2
0.00Double1.21.20
00.00Double1.201.20
#,#Double12345678901,234,567,890
#,,Double12345678901235
#,,,Double12345678901
#,##0,,Double12345678901,235
#0.##%Double0.0868.6%
0.###E+0Double860008.6E+4
0.###E+000Double860008.6E+004
0.###E-000Double860008.6E004
[##-##-##]Double123456[12-34-56]
##;(##)Double12341234
##;(##)Double-1234(1234)

Section Separators and Conditional Formatting

No comments
Section Separators and Conditional Formatting

Different formatting can be applied to a string based on whether the value is positive,
negative, or zero. To produce this behavior, a custom format string can contain
up to three sections separated by semicolons. These sections are described in the
following table.
No. of Sections
Description

One section

The format string applies to all values.

Two sections

The first section applies to positive values and zeros, and the second section applies
to negative values.
If the number to be formatted is negative, but becomes zero after rounding according
to the format in the second section, then the resulting zero is formatted according
to the first section.

Three sections

The first section applies to positive values, the second section applies to negative
values, and the third section applies to zeros.
The second section can be left empty (by having nothing between the semicolons),
in which case the first section applies to all nonzero values.
If the number to be formatted is nonzero, but becomes zero after rounding according
to the format in the first or second section, then the resulting zero is formatted
according to the third section.

Section separators ignore any preexisting formatting associated with a number when
the final value is formatted. For example, negative values are always displayed
without a minus sign when section separators are used. If you want the final formatted
value to have a minus sign, you should explicitly include the minus sign as part
of the custom format specifier.

.NET Custom Number Format Strings

No comments

.NET Custom Number Format Strings
Specifier
Name
Description
0Zero placeholderIf the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the result string. The position of the leftmost '0' before the decimal point and the rightmost '0' after the decimal point determines the range of digits that are always present in the result string. The "00" specifier causes the value to be rounded to the nearest digit preceding the decimal, where rounding away from zero is always used. For example, formatting 34.5 with "00" would result in the value 35.
#Digit placeholderIf the value being formatted has a digit in the position where the '#' appears in the format string, then that digit is copied to the result string. Otherwise, nothing is stored in that position in the result string. This specifier never displays the '0' character if it is not a significant digit, even if '0' is the only digit in the string. It will display the '0' character if it is a significant digit in the number being displayed. The "##" format string causes the value to be rounded to the nearest digit preceding the decimal, where rounding away from zero is always used. For example, formatting 34.5 with "##" would result in the value 35.
.Decimal pointThe first '.' character in the format string determines the location of the decimal separator in the formatted value; any additional '.' characters are ignored. The actual character used as the decimal separator is determined by the NumberDecimalSeparator property of the NumberFormatInfo that controls formatting.
,Thousand separator and number scalingThousand Separator Specifier:If one or more ',' characters is specified between two digit placeholders (0 or #) that format the integral digits of a number, a group separator character is inserted between each number group in the integral part of the output. The NumberGroupSeparator and NumberGroupSizes properties of the current NumberFormatInfo object determine the character used as the number group separator and the size of each number group.
Number Scaling Specifier:If one or more ',' characters is specified immediately to the left of the explicit or implicit decimal point, the number to be formatted is divided by 1000 each time a number scaling specifier occurs. For example, if the string "0,," is used to format the number 100 million, the output is "100". You can use thousand separator and number scaling specifiers in the same format string.
%Percentage placeholderThe presence of a '%' character in a format string causes a number to be multiplied by 100 before it is formatted. The appropriate symbol is inserted in the number itself at the location where the '%' appears in the format string. The percent character used is dependent on the current NumberFormatInfo class.
E0
E+0
E-0
e0
e+0
e-0
Scientific notationIf any of the strings "E", "E+", "E-", "e", "e+", or "e-" are present in the format string and are followed immediately by at least one '0' character, then the number is formatted using scientific notation with an 'E' or 'e' inserted between the number and the exponent. The number of '0' characters following the scientific notation indicator determines the minimum number of digits to output for the exponent. The "E+" and "e+" formats indicate that a sign character (plus or minus) should always precede the exponent. The "E", "E-", "e", or "e-" formats indicate that a sign character should only precede negative exponents.
\Escape characterIn C# and C++, the backslash character causes the next character in the format string to be interpreted as an escape sequence. It is used with traditional formatting sequences like '\n' (new line). In some languages, the escape character itself must be preceded by an escape character when used as a literal. Otherwise, the compiler interprets the character as an escape sequence. Use the string "\\" to display '\'. Note that this escape character is not supported in Visual Basic; however, ControlChars provides the same functionality.
'ABC'
"ABC"
Literal stringCharacters enclosed in single or double quotes are copied to the result string, and do not affect formatting.
;Section separatorThe ';' character is used to separate sections for positive, negative, and zero numbers in the format string.
OtherAll other charactersAny other character is copied to the result string, and does not affect formatting.

Examples

No comments

Format String

Data type

Value
Output
CDouble12345.6789$12,345.68
DInt321234512345
D8Int321234500012345
EDouble12345.67891.234568E+004
E10Double12345.67891.2345678900E+004
EDouble12345.67891.2346e+004


Format String

Data type

Value
Output
FDouble12345.678912345.68
F0Double12345.6789123456
F6Double12345.678912345.678900
GDouble12345.678912345.6789
G7Double12345.678912345.68
GDouble0.00000232.3E-6


Format String

Data type

Value

Output
G2Double12341.2E3
GDoubleMath.PI3.14159265358979
NDouble12345.678912,345.68
N4Double123456789123,456,789.0000
PDouble.12612.60 %
rDoubleMath.PI3.141592653589793

.NET Standard Number Format Strings

No comments


.NET Standard Number Format Strings

Specifier

Name
Description
C or cCurrencyThe number is converted to a string that represents a currency amount. The conversion is controlled by the currency format information of the current NumberFormatInfo object. Precision specifier (eg. “{0:C5}” allowed.
D or dDecimalThis format is supported only for integral types. The number is converted to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative. Precision specifier (eg. “{0:d3}” allowed.
E or eScientific
(expol)
The number is converted to a string of the form "-d.ddd…E+ddd" or "-d.ddd…e+ddd", where each 'd' indicates a digit (0-9). The string starts with a minus sign if the number is negative. One digit always precedes the decimal point. Precision specifier (eg. “{0:E5}” allowed. The case of the format specifier indicates whether to prefix the exponent with an 'E' or an 'e'. The exponent always consists of a plus or minus sign and a minimum of three digits. The exponent is padded with zeros to meet this minimum, if required.
F or fFixed-pointThe number is converted to a string of the form "-ddd.ddd…" where each 'd' indicates a digit (0-9). The string starts with a minus sign if the number is negative. Precision specifier (eg. “{0:f4}” allowed.
G or gGeneralThe number is converted to the most compact of either fixed-point or scientific notation, depending on the type of the number and whether a precision specifier is present.
N or nNumberThe number is converted to a string of the form "-d,ddd,ddd.ddd…", where '-' indicates a negative number symbol if required, 'd' indicates a digit (0-9), ',' indicates a thousand separator between number groups, and '.' indicates a decimal point symbol. The actual negative number pattern, number group size, thousand separator, and decimal separator are specified by the current NumberFormatInfo object. Precision specifier (eg. “{0:N5}” allowed.
P or pPercentThe number is converted to a string that represents a percent as defined by the NumberFormatInfo.PercentNegativePattern property if the number is negative, or the NumberFormatInfo.PercentPositivePattern property if the number is positive. The converted number is multiplied by 100 in order to be presented as a percentage. Precision specifier (eg. “{0:p6}” allowed.
R or rRound-tripThis format is supported only for the Single and Double types. The round-trip specifier guarantees that a numeric value converted to a string will be parsed back into the same numeric value. When a numeric value is formatted using this specifier, it is first tested using the general format, with 15 spaces of precision for a Double and 7 spaces of precision for a Single. If the value is successfully parsed back to the same numeric value, it is formatted using the general format specifier. However, if the value is not successfully parsed back to the same numeric value, then the value is formatted using 17 digits of precision for a Double and 9 digits of precision for a Single. Precision specifier NOT allowed.
X or xHexa
decimal
This format is supported only for integral types. The number is converted to a string of hexadecimal digits. The case of the format specifier indicates whether to use uppercase or lowercase characters for the hexadecimal digits greater than 9. Precision specifier (eg. "{0:x4}" allowed. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier.
Any other single char.(Unknown specifier)An unknown specifier throws a runtime format exception.