---
title: "判断字符串是否是数字[C#]"
author: "DJ阿布"
date: "2011-09-15T11:15:40Z"
tags: []
categories: ["编程语言"]
slug: "c"
draft: false
lastmod: "2011-09-15T11:15:40Z"
id: 1172360
url: "https://itchen.iteye.com/blog/1172360"
---

```
        private bool isNumberic(string message)
        {
            Regex rex =new Regex(@"^\d+$");
            return rex.IsMatch(message);
        }
```