База ответов ИНТУИТ

Common Intermediate Language и системное программирование в Microsoft .NET

<<- Назад к вопросам

В данном примере:
Default Public ReadOnly Property     Array (ByVal Index As Integer) As Integer    Get      Return Arr(Index)    End Get  End Property  Public ReadOnly Property Count() As Integer    Get      Return Arr.Length    End Get  End Property
для доступа к отсортированному массиву используются свойства:

(Ответ считается верным, если отмечены все правильные варианты ответов.)

Варианты ответа
Public
Array(Верный ответ)
Get
Count(Верный ответ)
Похожие вопросы
В данном примере:
public abstract class Expression{ public abstract string GenerateCS(); public abstract void GenerateCIL(ILGenerator il); public abstract double Evaluate(double x);}
метод GenerateCS:
В данном примере:
public abstract class Expression{ public abstract string GenerateCS(); public abstract void GenerateCIL(ILGenerator il); public abstract double Evaluate(double x);}
метод GenerateCIL:
В данном примере:
public abstract class Expression{ public abstract string GenerateCS(); public abstract void GenerateCIL(ILGenerator il); public abstract double Evaluate(double x);}
метод Evaluate:
Класс InsertSortedArray:
using VBLib;public class InsertSortedArray: SortedArray{  protected override void Sort()  {    for (int i = 0; i < Arr.Length-1; i++)    {      int max = i;      for (int j = i+1; j < Arr.Length; j++)        if (Arr[j] > Arr[max])          max = j;      int tmp = Arr[i];      Arr[i] = Arr[max];      Arr[max] = tmp;    }  }  public InsertSortedArray(int[] A): base(A) { }}
переопределяет абстрактный метод:
В данном примере:
#include <stdio.h>#include <process.h>#include <windows.h>#define THREADS 10#define ASIZE  10000000static LONG   array[ASIZE];unsigned __stdcall ThreadProc( void *param ){  int  i;  for ( i = 0; i < ASIZE; i++ ) array[i]++;  return 0;}int main( void ){  HANDLE  	hThread[THREADS];  unsigned 	dwThread;  int 			i, errs;  for ( i = 0; i < THREADS; i++ )    hThread[i] = (HANDLE)_beginthreadex(      NULL, 0, ThreadProc, NULL, 0, &dwThread    );  WaitForMultipleObjects( THREADS, hThread, TRUE, INFINITE );  for ( i = 0; i < THREADS; i++ ) CloseHandle( hThread[i] );  for ( errs=i=0; i<ASIZE; i++ )    if ( array[i] != THREADS ) errs++;  if ( errs ) printf("Detected %d errors!\n", errs );  return 0;}
несколько потоков увеличивают значение элементов общего массива на:
В следующем примере:
.class public SampleClass{ .method public static void Demo() {  .entrypoint  .maxstack 3  ldc.r8 	  0.0  ldc.r8 	  0.0  newobj 	  void Point::.ctor(float64,float64)  ldc.r8 	  1.0  ldc.r8 	  1.0  newobj 	  void Point::.ctor(float64,float64)  call 		  float64 Point::Distance(valuetype Point, valuetype Point)  call 	  void [mscorlib]System.Console::WriteLine (float64)  ret   }}
метод Demo будет вычислять расстояние между точками:
В следующем примере:
class SomeData {  [ThreadStatic]  public static double  xxx;  ...
поле класса SomeData.xxx будет размещено:
Флаг доступа для членов типа Public имеет следующее значение:
Самое начало процедуры потока, там, где определяется номер полосы:
public static void ThreadProc(){  int    i,j,k, from, to;  from = ( m_stripused++ ) * m_stripsize;  to = from + m_stripsize;  ...
с помощью атомарных операций можно переписать так:
В данном примере:
void make_file (FILE* file, PINPUT_PARAMETERS inP){  make_headers	 		(file, inP);  make_text_section	(file, inP);  make_cli_section 	(file, inP);  make_reloc_section	(file, inP);};
функция make_file вызывает: