ASP. NET 면접 문제 (1)
1. private、 protected、 public、 internal 。
. private : , 。
protected : , 。
public : , , 。
internal: 。
2 . ASP.NET 。
. 1. QueryString, ....?id=1; response. Redirect()....;2. Session ;3. Server.Transfer
3. : 1、1、2、3、5、8、13、21、34...... 30 , 。
:
public class MainClass {
public static void Main()
{
Console.WriteLine(Foo(30));
}
public static int Foo(int i)
{
if (i <= 0)
return 0;
else if(i > 0 && i <= 2)
return 1;
else return Foo(i -1) + Foo(i - 2);
}
}
4.C# ? ?
: 。 。
,
5.override
:override 。 。 , ; Override 。 。
6. B/S , Session、Cookie、Application, ?
:this.Server.Transfer
7. TextBox string.Empty?
:
foreach (System.Windows.Forms.Control control in this.Controls)
{
if (control is System.Windows.Forms.TextBox)
{
System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ;
tb.Text = String.Empty ;
}
}
8. ?
:
int [] array = new int;
int temp = 0 ;
for (int i = 0 ; i < array.Length - 1 ; i++)
{
for (int j = i + 1 ; j < array.Length ; j++)
{
if (array[j] < array[i])
{
temp = array[i] ;
array[i] = array[j] ;
array[j] = temp ;
}
}
}
9. C# , ?
: 。 。
10. , : 1-2+3-4+……+m
:
int Num = this.TextBox1.Text.ToString() ;
int Sum = 0 ;
for (int i = 0 ; i < Num + 1 ; i++)
{
if((i%2) == 1)
{
Sum += i ;
}
else
{
Sum = Sum - I ;
}
}
System.Console.WriteLine(Sum.ToString());
System.Console.ReadLine() ;
11. .net B/S , , ?
: 3
, , 。
。
, , 。
。
: , , , 。
: 。
12.
using System;
class A
{
public A()
{
PrintFields();
}
public virtual void PrintFields(){}
}
class B:A
{
int x=1;
int y;
public B()
{
y=-1;
}
public override void PrintFields()
{
Console.WriteLine("x={0},y={1}",x,y);
}
}
new B() B , ?
:X=1,Y=0;x= 1 y = -1
13. ?
: 。 。 。
14.CTS、CLS、CLR ?
:CTS: 。CLS: 。CLR: 。
15. ?
: 。 。
16. ?
:unsafe: 。 CLR 。
17. ?
:RTTI: 。
18.net ? ?
:DataSet: 。
DataCommand: 。
DataAdapter: , 。
19.ASP.net ? ?
:10。Windwos( ) IIS...From( ) ....Passport( )
20. Code-Behind ?
: 。
21. .net , ?
: 。( , , , )
22. WebService ?
:1. WSDL.exe 。
2. VS.NET Add Web Reference
23..net Remoting ?
: , , 。
24. C# ,string str = null string str = “” 。
:string str = null , string str = "" 。
25. dotnet (class) (struct) ?
:Class , , ,Struct , .
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
.net 데이터베이스 조작 프레임워크 SqlSugar의 간단한 시작SqlSugar는 오래된 브랜드입니다.NET 데이터베이스 조작 프레임워크, 과당 빅데이터 과학기술팀이 유지 보수 및 업데이트, Github star 수 EF 및 Dapper 버금가 지원 데이터베이스: MySql, S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.