Click here to Skip to main content
15,889,992 members
Home / Discussions / C#
   

C#

 
AnswerRe: MDI Related issue Pin
#realJSOP11-Sep-08 23:37
mve#realJSOP11-Sep-08 23:37 
AnswerRe: MDI Related issue Pin
Mbah Dhaim12-Sep-08 2:00
Mbah Dhaim12-Sep-08 2:00 
QuestionRaising events from an Unmanaged ActivX Control in C# library Pin
Sreenath Varma11-Sep-08 18:12
Sreenath Varma11-Sep-08 18:12 
QuestionCopy byte arrays into one Pin
CodingLover11-Sep-08 18:08
CodingLover11-Sep-08 18:08 
AnswerRe: Copy byte arrays into one Pin
stancrm11-Sep-08 20:36
stancrm11-Sep-08 20:36 
AnswerRe: Copy byte arrays into one Pin
Guffa11-Sep-08 20:43
Guffa11-Sep-08 20:43 
QuestionRe: Copy byte arrays into one Pin
CodingLover11-Sep-08 23:11
CodingLover11-Sep-08 23:11 
AnswerRe: Copy byte arrays into one Pin
Guffa12-Sep-08 0:24
Guffa12-Sep-08 0:24 
CodingLover wrote:
But the question is, that way is safe. I mean may be three arrays can be large.


If you don't have enough memory for the original arrays and the combined array, you could instead make a class that contains the arrays and can be used as a single array. Someting like:
public class ArrayCombiner<T> {

   private List<T[]> _arrays = new List<T[]>();
   private int _length = 0;

   public void Add(T[] array) {
      _arrays.Add(array);
      _length += array.Length;
   }

   public int Length { get { return _length; } }

   public T this[int index] {
      get {
         if (index < 0 || index >= _length) {
            throw new IndexOutOfRangeException();
         }
         int array = 0;
         while (index > _arrays[array].Length) {
            index -= _arrays[array].Length;
            array++;
         }
         return _arrays[array][index];
      }
   }

}

CodingLover wrote:
And also in copy a bit can be shift.


What?

Despite everything, the person most likely to be fooling you next is yourself.

Questionpassing the value "null" for the ChangeDisplaySettings API function in C# Pin
c10justin92411-Sep-08 16:05
c10justin92411-Sep-08 16:05 
AnswerRe: passing the value "null" for the ChangeDisplaySettings API function in C# Pin
yasirjaseem11-Sep-08 17:41
yasirjaseem11-Sep-08 17:41 
GeneralRe: passing the value "null" for the ChangeDisplaySettings API function in C# Pin
c10justin92411-Sep-08 18:44
c10justin92411-Sep-08 18:44 
AnswerRe: passing the value "null" for the ChangeDisplaySettings API function in C# Pin
Mark Salsbery12-Sep-08 7:17
Mark Salsbery12-Sep-08 7:17 
GeneralRe: passing the value "null" for the ChangeDisplaySettings API function in C# Pin
c10justin92412-Sep-08 9:49
c10justin92412-Sep-08 9:49 
GeneralRe: passing the value "null" for the ChangeDisplaySettings API function in C# Pin
tuxy4221-May-10 5:17
tuxy4221-May-10 5:17 
QuestionUITypeEditor problem - Get calling assembly Pin
Chris_McGrath11-Sep-08 15:24
Chris_McGrath11-Sep-08 15:24 
QuestionWindow.open() not working in IE7 & IE8 Pin
hivshi11-Sep-08 14:42
hivshi11-Sep-08 14:42 
AnswerRe: Window.open() not working in IE7 & IE8 Pin
Christian Graus11-Sep-08 15:21
protectorChristian Graus11-Sep-08 15:21 
AnswerRe: Window.open() not working in IE7 & IE8 Pin
Guffa12-Sep-08 0:27
Guffa12-Sep-08 0:27 
Questiondatagridview - edit columns size Pin
nelsonpaixao11-Sep-08 14:27
nelsonpaixao11-Sep-08 14:27 
AnswerRe: datagridview - edit columns size Pin
Eslam Afifi11-Sep-08 14:39
Eslam Afifi11-Sep-08 14:39 
AnswerRe: datagridview - edit columns size Pin
Mycroft Holmes11-Sep-08 15:10
professionalMycroft Holmes11-Sep-08 15:10 
QuestionFunny Control Behavior [modified] Pin
Member 204889411-Sep-08 14:00
Member 204889411-Sep-08 14:00 
QuestionToolstrip Items Disappeared Pin
kruegersck11-Sep-08 13:05
kruegersck11-Sep-08 13:05 
Questionstruct X class Pin
Dirso11-Sep-08 12:57
Dirso11-Sep-08 12:57 
AnswerRe: struct X class Pin
Judah Gabriel Himango11-Sep-08 13:00
sponsorJudah Gabriel Himango11-Sep-08 13:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.