c#中字符串显示上标和下标解决办法
Posted Snowdust
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c#中字符串显示上标和下标解决办法相关的知识,希望对你有一定的参考价值。
原文地址:http://lightgis.com/2010/Unicode-Entity-Codes-can-be-used-by-csharp.html
被上标给折腾的 只是想给计算出的面积加上平方的上标 可惜不知道 还楞是搜不到 最后想这些特殊字符的核心code应该是一样的吧 就用html里的平方上标code换成C#的转义字符 居然成了 囧··· 时间大把流逝···
具体是这么用这个表的:
比如想显示∞(根号无穷)
在表中找到∞ 及其HexEntity
∞ (HTML中可以直接用)
在C#中需要用转义符 即/x221E
再比如在C#中表示平方上标 即用/x00b2
Common Arithmetic & Alebgra
Character Name | Character | Entity | Num Entity | Hex Entity |
---|---|---|---|---|
LESS THAN | < | < | < | < |
GREATER THAN | > | > | > | > |
LESS THAN OR EQUAL TO | ≤ | ≤ | ≤ | ≤ |
GREATER THAN OR EQUAL TO | ≥ | ≥ | ≥ | ≥ |
PLUS OR MINUS | ± | ± | ± | ± |
NOT EQUALS | ≠ | ≠ | ≠ | ≠ |
DIVISION SIGN | ÷ | ÷ | ÷ | ÷ |
TIMES X | × | × | × | × |
MINUS | − | − | − | − |
DIVISION SLASH | ∕ | -- | ∕ | ∕ |
FRACTION SLASH | ⁄ | &frasl | ⁄ | ⁄ |
SQUARE ROOT RADICAL | √ | √ | √ | √ |
CUBE ROOT | ∛ | -- | ∛ | ∛ |
FOURTH ROOT | ∜ | -- | ∜ | ∜ |
INFINITY | ∞ | ∞ | ∞ | ∞ |
ALEF INFINITY SYMBOL | ℵ | ℵ | ℵ | ℵ |
FUNCTION ITALIC F | ƒ | ƒ | ƒ | ƒ |
PRIME (single quote) | ′ | ′ | ′ | ′ |
DOUBLE PRIME (double quote) | ″ | ″ | ″ | ″ |
TRIPLE PRIME (triple quote) | ‴ | -- | ‴ | ‴ |
THEREFORE (Triangular Dots) | ∴ | ∴ | ∴ | ∴ |
DOT OPERATOR | ⋅ | ⋅ | ⋅ | ⋅ |
SUPERSCRIPT TWO | ¹ | ¹ | ¹ | ¹ |
SUPERSCRIPT TWO | ² | ² | ² | ² |
SUPERSCRIPT THREE | ³ | ³ | ³ | ³ |
LEFT ANGLE BRACKET | 〈 | ⟨ | 〈 | 〈 |
RIGHT ANGLE BRACKET | 〉 | ⟩ | 〉 | 〉 |
LEFT CEILING BRACKET | ⌈ | ⌈ | ⌈ | ⌈ |
RIGHT CEILING BRACKET | ⌉ | ⌉ | ⌉ | ⌉ |
LEFT FLOOR BRACKET | ⌊ | ⌈ | ⌊ | ⌊ |
RIGHT FLOOR BRACKET | ⌋ | ⌉ | ⌋ | ⌋ |
CIRCLED PLUS (Direct Sum) | ⊕ | ⊕ | ⊕ | ⊕ |
CIRCLED TIMES (Vector Product) | ⊗ | ⊗ | ⊗ | ⊗ |
以上是关于c#中字符串显示上标和下标解决办法的主要内容,如果未能解决你的问题,请参考以下文章