|
Hi y'all .. I hope this is an interesting one ...
Within an executing method, I can call MethodBase.GetCurrentMethod() and
retrieve info about the method that's currently running, including parameter
names & data types.
Is there a way to get the parameter v a l u e s as well ??? ( I know ...
this is indeed weird, but ... )
Thanks,
Mihai
|
|
|
|
|
aren't you in the method-call anyway ? you've got the value of the parameters already..
|
|
|
|
|
whwt is wpf and is it related to 3d in c#?
########################
|
|
|
|
|
Yes, it is related to C# 3.0
http://msdn.microsoft.com/windowsvista/experience/#wpfpt
|
|
|
|
|
It's not related to C# 3.0. Don't confuse C# 3.0 with .NET 3.0 - .NET 3.0 and WPF are already released, but C# 3.0 will come later (with .NET 3.5), it's main feature is integration of (database/XML/etc) queries into C#.
|
|
|
|
|
Hi all,
I have a MS Access Database and i want to programmatically transfer it to a csv file...
how can i stream the dataset that has the data from MS Access database and write it to csv file?
Thanks in advance.
-::maximus::-
|
|
|
|
|
Search CodeProject real hard did ya?
http://www.codeproject.com/aspnet/ImportExportCSV.asp
|
|
|
|
|
Hi,
i am new to coding in .net.i was trying to catch dataset from a function.my ques. is
What does dataset returns when no rows are selected in it?
also
how can i use this it on right hand side of exp. in a if construct?
iam coding in c#.
thanks in advances.
|
|
|
|
|
It returns an empty dataset, probably with one empty table in it. It will work fine, and just render nothing.
Christian Graus - C++ MVP
|
|
|
|
|
thanks chris
can u send me some ebooks on c#.net.
|
|
|
|
|
No. Books cost money, go buy some.
Christian Graus - C++ MVP
|
|
|
|
|
If No rows in dataset it will return a empty table.
Accessing the dataset table:
ds.Tables[0];
ds.Tables[0].Rows[index][columnName];
|
|
|
|
|
hi
thanks for the reply.
ashu
|
|
|
|
|
hi frends........
can anybody help me
how to bind custom collection to a datagrid
thanks in advance
soori
soori
|
|
|
|
|
By setting the data source of the data grid.
Christian Graus - C++ MVP
|
|
|
|
|
sorry thats not my question
wht is custom collection?how can we do that.
soori
|
|
|
|
|
Although the question is very vague on what you want to do let see if this helps.
You can create a custom collection by implementing IList, IEnumerable etc interfaces or extending a CollectionBase class to store whatever object you want to specialize to.
In order to sent a Custom Collection to a DataGrid it should be one of the following
A DataTable
A DataView
A DataSet
A DataViewManager
Any component that implements the IListSource interface
Any component that implements the IList interface
CustomCollection implements IList interface so it will work as a DataSource to DataGrid. Hope this helps.
|
|
|
|
|
Hi All,
Please could someone give me a code snippet on how to convert an image into Base64. I think i could use it in this segment myXmlTextWriter.WriteElementString("ImagePath", Convert.ToString(ps.ImagePath)); , Convert the image into Base64 in C# before writing it into xml file. The reason why i need to do this is to embed an image into the xml so that it is embedded into my HTML after the xslDoc.Transform(xmlPath, ExamplePath+"\\Example.html",resolver); .
Actually you can display base-64 images inline, using the data url format -
see the spec. at http://www.ietf.org/rfc/rfc2397.txt[^] .
I read up on this topic and came across the following: <IMG SRC="data:image/gif,base64;[...]"> where the [...] contains your base-64
string
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
If you have an Image object, save it to a MemoryStream to get a byte array.
If you have an image file, load it into a byte array.
Use the Convert.ToBase64String method to make the conversion.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I came across this example...
Image srcImage = new Bitmap(txtGIFImageFile.Text);<br />
MemoryStream memStream = new MemoryStream();<br />
srcImage.Save(memStream, System.Drawing.Imaging.ImageFormat.Gif);<br />
<br />
StringBuilder strBuilder = new StringBuilder();<br />
StringWriter writerSerialized = new StringWriter(strBuilder);<br />
XmlTextWriter writerXMLText = new XmlTextWriter(writerSerialized);<br />
<br />
XmlSerializer serializerXML = new XmlSerializer(memStream.GetBuffer().GetType());<br />
serializerXML.Serialize(writerXMLText, memStream.GetBuffer());<br />
<br />
writerXMLText.Close();<br />
txtSerializedText.Text = strBuilder.ToString();
would it be possible to insert a path with the file name (like for example: "C:\img\img123.jpg" ) in the Image srcImage = new Bitmap(txtGIFImageFile.Text); part?
Thank you in advance.
Nico
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
NarutoFan#1 wrote: would it be possible to insert a path with the file name (like for example: "C:\img\img123.jpg" ) in the Image srcImage = new Bitmap(txtGIFImageFile.Text); part?
I take it that you have no clue how the code really works?
The new Bitmap() part is loading the image from the file specified in the text box. Of course you can use any string you like instead of reading a string from a text box.
Are you going to convert the image from one format to anohter? Otherwise there is no reason to load the image and then save it again.
---
b { font-weight: normal; }
|
|
|
|
|
Yes, i need to convert the image to Base64, this is the format i operantly need to be able to embed an image into the xml to be able to embed it in the html.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
You can't convert an image into base 64 format, as base 64 is not an image format. Converting from one image format to another is for example converting a GIF image into a JPEG image. What you convert into base 64 is the image file data, not the image itself.
If you want to send the image data in the current format, there is no need to unpack it into an Image object only to re-pack it back to the same format. All you do is use a lot of processing time for nothing, and possibly cause degradation of the image quality.
---
b { font-weight: normal; }
|
|
|
|
|
Okay thank you for your time. But would it be a good idea to convert the image file data to base64 or would it be a better idea to just redo the xml and xsl and just use FOP to create a pdf file with the image embedded onto that?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
okay, i just redid the whole report. Thank you for your time.
Enjoy your day.
Thank goodness it's Friday.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|