小编Fil*_*son的帖子

设置0-30范围内的值

我想设置一个允许介于0到30之间的值.我正在MSSQL的desing模式下工作.

sql-server sql-server-2008

3
推荐指数
1
解决办法
3852
查看次数

覆盖属性不起作用

我的类Ellipse应该从我的类继承Shape但是我收到此错误消息:

错误1'ConsoleApplication3.Ellipse'未实现继承的抽象成员'ConsoleApplication3.Shape.Perimeter.get'

我也收到了我隐藏的错误消息Area,一个属性Ellipse.

有人可以帮我吗?

我的形状类看起来像这样:

public abstract class Shape
{
    //Protected constructor
    protected Shape(double length, double width)
    {
        _length = length;
        _width = width;
    }


    private double _length;
    private double _width;

    public abstract double Area
    {
        get;
    }
Run Code Online (Sandbox Code Playgroud)

我的椭圆类是:

class Ellipse : Shape
{
    //Constructor
    public Ellipse(double length, double width)
        :base(length, width)
    {

    }

    //Egenskaper
    public override double Area
    {
        get
        {
            return Math.PI * Length * Width;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

c#

1
推荐指数
1
解决办法
150
查看次数

Enum拥有letention可访问性而不是属性Outcome1

public class SecretNumber
{
    //Construktor
    public SecretNumber()
    {
        Initialize();
        _previousGuesses = new List<int>();
    }

    //Constant
    public const int MaxNumberOfGuesses = 7;

    //Field
    private int _number;
    private List<int> _previousGuesses;

    //Property
    public bool CanMakeGuess
    {
        get;
    }

    public int Count
    {
        get;
    }

    public int? Number
    {
        public get;
    }

    //Lite oklart hur man ska göra när fälten är autoimplementerade
    public Outcome Outcome1
    {
        get
        {
            return Outcome1;
        }
        private set
        {
            Outcome1 = value;
        }
    }

    public ReadOnlyCollection<int> PreviousGuesses
    {
        get; …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net webforms

1
推荐指数
1
解决办法
105
查看次数

如何用css创建一个倾斜的边框

我想切割边框,如下图所示:

在此输入图像描述

如果可能的话,它们被切除的区域应该是透明的.

这是我目前的代码:

.main {
    height: 50px;
    background-color: #d6d6d6;
}

footer {
    height: 93px;
    background-color: #ff6138;
    position: relative;
}

.footer-info {
    position: absolute;
    bottom: 27px;
    left: 33px;
}

footer span {
    color: #ffff9d;
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: 0.05em;
    font-size: 1.1875em;
}

footer .tel {
    color: #fff;
    font-weight: 400;
    font-size: 1em;
    margin-left: 24px;
}

body {
    background-color: #ff9200;
}
Run Code Online (Sandbox Code Playgroud)

链接到代码http://jsfiddle.net/NpX23/

html css html5 transform css3

1
推荐指数
1
解决办法
312
查看次数

在textfield(窗体)后插入节点

我想在我的文本字段后面(右边)插入一个文本,我不允许使用innerHTML.我的HTML代码看起来像这样

<label for="name">Firstname:</label> 
<input type="text" name="Name:" id="name" size="40" />
Run Code Online (Sandbox Code Playgroud)

提前致谢!

html javascript

0
推荐指数
1
解决办法
228
查看次数

标签 统计

c# ×2

html ×2

.net ×1

asp.net ×1

css ×1

css3 ×1

html5 ×1

javascript ×1

sql-server ×1

sql-server-2008 ×1

transform ×1

webforms ×1