Fraquinho 0 Denunciar post Postado Junho 21, 2007 Como posso utilizar um ArrayList em um programa setar seus valores e mandar executar um outro programa e utilizar os valores deste ArrayList , pode ser tambem valores de Strings. Compartilhar este post Link para o post Compartilhar em outros sites
Graymalkin 0 Denunciar post Postado Junho 22, 2007 Existem várias formas (Sockets, RPC, XComm, WebService, serialização em arquivo, etc.). Uma forma simples é serializar o objeto, ou seja, transformá-lo em um arquivo. Daí no outro programa você desserializa, ou seja, transforma o arquivo em objeto novamente. Segue um exemplo: Namespaces utilizados: using System.Collections;using System.Runtime.Serialization;using System.Runtime.Serialization.Formatters.Binary; Serializando: ArrayList a = new ArrayList();a.Add(1);a.Add("teste");a.Add(true);BinaryFormatter f = new BinaryFormatter();f.Serialize(new System.IO.FileStream("c:/teste.bin", System.IO.FileMode.Create), a); Desserializando: BinaryFormatter f = new BinaryFormatter();ArrayList a = (ArrayList)f.Deserialize(new System.IO.FileStream("c:/teste.bin", System.IO.FileMode.Open));foreach (object obj in a){ MessageBox.Show(obj.ToString());} Certo? ;) Graymalkin Compartilhar este post Link para o post Compartilhar em outros sites
Fraquinho 0 Denunciar post Postado Julho 2, 2007 Mestre Graymalkin.Funcionou direitinho valeu pela dica. Quando eu crescer quero ser igual a você. Compartilhar este post Link para o post Compartilhar em outros sites