Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~5K People Reached
Favorite Forums
Favorite Tags
Member Avatar for mesbahuk

I am working on a Java to C# conversion project. In this project, my custom java library uses `java.net` packages [`DatagramPacket`](http://docs.oracle.com/javase/1.4.2/docs/api/java/net/DatagramPacket.html) and [`DatagramSocket`](http://docs.oracle.com/javase/1.4.2/docs/api/java/net/DatagramSocket.html) classes. Are there similar classes in .NET C# with similar functionalities?

Member Avatar for ddanbe
0
331
Member Avatar for mesbahuk

I have java code that uses Java's `java.util.Timer.schedule()` method. **Method Description:** *The `schedule(TimerTask task,long delay,long period)` method is used to schedule the specified task for repeated fixed-delay execution, beginning after the specified delay.* public void schedule(TimerTask task,long delay,long period)java.util.Timer.schedule() Is there an equivalent method in C#? If NOT, how can …

Member Avatar for Momerath
0
485
Member Avatar for mesbahuk

I have a Java code block like following: Vector<NameAddress> route = dialog.getRoute(); for ( Enumeration<NameAddress> e = route.elements(); e.hasMoreElements(); ) { // some more to copy route to another Vector<> } I am trying to convert it in C# and here is my code: List<NameAddress> route = dialog.getRoute(); for ( …

Member Avatar for C#Jaap
0
298
Member Avatar for mesbahuk

In my *Java to C#* Conversion Project, at one point I came to use java's `startsWith(string prefix, int toffset)` method. I used a substring to solve it for C#. Java Code Snippet: String str1 = "one over the coocoo's head"; String str2 = "someone"; System.out.println(str1.startsWith(str2, 4)); C# does not have …

Member Avatar for JoeProgrammer
0
396
Member Avatar for mesbahuk

For my **Java to C#** conversion project, I need to use something equivalent to Java's `Calender` class. I have some codes like: Calender cal = Calender.getInstance(); long time = Calendar.getInstance().getTime().getTime(); long time2 = System.currentTimeMillis(); which returns some random values at different times. I have come to know C-sharp's `DateTime` is …

Member Avatar for ddanbe
0
976
Member Avatar for mesbahuk

I have a Java code block like following: public TcpConnection(TcpSocket socket, long alive_time, ITcpConnectionListener listener) { init(socket,alive_time,listener); start(); } For the conversion in C#, When I try to replace the `start()` method with `System.Threading.ThreadStart()`, it gives an error. How can I start a thread in C#?

Member Avatar for ddanbe
0
279
Member Avatar for mesbahuk

I'm currently working in a java to c# conversion project. In one part I got this Java code snippet. public CustomType someMethod(Message msg) throws IOException { byte[] data = msg.toString().getBytes(); } to my understanding, data contains the byte representation of the string *msg.toString()* But when I try to write it …

Member Avatar for mesbahuk
0
262
Member Avatar for Aadhya169

Hello members... How are you all ??? I just started the programming and want to learn C for that.. so please tell me the best book to learn the C from the starting... Thank you in advance......

Member Avatar for whitech
-1
293
Member Avatar for mesbahuk

In java this is how a DerivedClass can implement it's BaseClass's constructor. public DerivedClass extends BaseClass { //some properties public DerivedClass(param) { super(param); } } I have learnt C-Sharp's *base()* does the similar thing, but when I replace *super(param)* with *base(param)*, it does not gives what I'm expecting. How can …

Member Avatar for Ketsuekiame
0
265
Member Avatar for mesbahuk

I have been working on a conversion project for last few days where I need to convert a Java library to C#. At one point I came to java's certain feature called [Exceptions Thrown by a Method](http://docs.oracle.com/javase/tutorial/essential/exceptions/declaring.html). Here is a little glimpse of it: public boolean isRequest() throws NullPointerException { …

Member Avatar for Ketsuekiame
0
303
Member Avatar for mesbahuk

In the conversion process of a java to c# project, i have come to java's ***indexOf()*** function in ***string.java*** class, which takes in two integers (int ch, int fromIndex) and return some integer value for a char (i'm guessing its an ASCII value). I need to know if there is …

Member Avatar for mesbahuk
0
652
Member Avatar for mesbahuk

I am currently converting a Java library to C# .Net, please help me to find if there are C# equivalents of the following java specifics: * RuntimeException() * IllegalStateException() * StringBuffer Any resource on Java to C# conversion will be very helpful. Thanks in advance.

Member Avatar for mesbahuk
0
268